Tweak to Shorten::generateHash for easier reuse