Added hash function to add more data.

This commit is contained in:
neviyn 2018-05-16 02:05:07 +01:00
parent e3eac48353
commit 46d98e7068

View File

@ -6,4 +6,8 @@ proc fnv1a*(data: varargs[uint8]): uint32 =
result = FNVOffsetBasis
for i in data:
result = result xor i
result = result * FNVPrime
result = result * FNVPrime
proc fnv1aCompound*(base: uint32, addition: uint8): uint32 =
result = base xor addition
result = result * FNVPrime