Javascript custom hashing library