cespare/xxhash

get 16/32 byte sized hash from some input

vtolstov opened this issue · 1 comments

i want to replace sha256 hashing in my program, i don't need strongly crypto hashing function. but i'm need to have hash with 16 or 32 byte long. How can i do that?

The XXH64 algorithm implemented by this package produces 64-bit (8-byte) values. If your application requires 16+ bytes, then it's up to you how you will produce 8 extra bytes. You could pad with 0 bytes, for instance, or you could repeat the hash bytes.