Join GitHub today
Hash UDFs should return zero-padded strings of uniform length even when leading bits are zero. #93
The Hash UDFs in 'hex' mode currently do not return always the same-length string, because
This is surprising behavior, and a trap for those practicing the frequent trick of generating a hash and chopping off just the number of bits you need:
mrflip@5c4a77c makes the returns a string zero-padded to be (length of hash / 4) characters long. It needs a lookup table to know how to format a SHA hash; all of the potential SHA-prefixed algorithms in Java 7 are covered.