From 5332705e3108c35889020b105d0b1f68b6d48644 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Thu, 14 Jul 2022 11:07:52 +0200 Subject: [PATCH] [hash] Give crc-64 a 64-bit seed. --- core/hash/crc.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/hash/crc.odin b/core/hash/crc.odin index b504e92fb..9c0048a0f 100644 --- a/core/hash/crc.odin +++ b/core/hash/crc.odin @@ -1,8 +1,8 @@ package hash @(optimization_mode="speed") -crc64_ecma_182 :: proc(data: []byte, seed := u32(0)) -> u64 #no_bounds_check { - result := u64(seed) +crc64_ecma_182 :: proc(data: []byte, seed := u64(0)) -> (result: u64) #no_bounds_check { + result = seed #no_bounds_check for b in data { result = result<<8 ~ _crc64_table_ecma_182[((result>>56) ~ u64(b)) & 0xff] }