Added hash function to add more data.
This commit is contained in:
parent
e3eac48353
commit
46d98e7068
@ -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
|
Loading…
Reference in New Issue
Block a user