From 46d98e7068be47d66cb0fd6105917494fcfe3e43 Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Wed, 16 May 2018 02:05:07 +0100 Subject: [PATCH] Added hash function to add more data. --- kernel/arch/i386/hash.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/arch/i386/hash.nim b/kernel/arch/i386/hash.nim index e3d5864..64f1e4b 100644 --- a/kernel/arch/i386/hash.nim +++ b/kernel/arch/i386/hash.nim @@ -6,4 +6,8 @@ proc fnv1a*(data: varargs[uint8]): uint32 = result = FNVOffsetBasis for i in data: result = result xor i - result = result * FNVPrime \ No newline at end of file + result = result * FNVPrime + +proc fnv1aCompound*(base: uint32, addition: uint8): uint32 = + result = base xor addition + result = result * FNVPrime \ No newline at end of file