const FNVPrime = 16777619'u32 FNVOffsetBasis = 0x811c9dc5'u32 proc fnv1a*(data: varargs[uint8]): uint32 = result = FNVOffsetBasis for i in data: result = result xor i result = result * FNVPrime proc fnv1aCompound*(base: uint32, addition: uint8): uint32 = result = base xor addition result = result * FNVPrime