File tree 1 file changed +5
-8
lines changed 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,15 @@ func Hash64(buffer []byte, seed uint64) uint64 {
21
21
v := [4 ]uint64 {hash , hash , hash , hash }
22
22
23
23
for len (ptr ) >= 32 {
24
- v [0 ] += binary .LittleEndian .Uint64 (ptr ) * k0
25
- ptr = ptr [8 :]
24
+ v [0 ] += binary .LittleEndian .Uint64 (ptr [:8 ]) * k0
26
25
v [0 ] = rotate_right (v [0 ], 29 ) + v [2 ]
27
- v [1 ] += binary .LittleEndian .Uint64 (ptr ) * k1
28
- ptr = ptr [8 :]
26
+ v [1 ] += binary .LittleEndian .Uint64 (ptr [8 :16 ]) * k1
29
27
v [1 ] = rotate_right (v [1 ], 29 ) + v [3 ]
30
- v [2 ] += binary .LittleEndian .Uint64 (ptr ) * k2
31
- ptr = ptr [8 :]
28
+ v [2 ] += binary .LittleEndian .Uint64 (ptr [16 :24 ]) * k2
32
29
v [2 ] = rotate_right (v [2 ], 29 ) + v [0 ]
33
- v [3 ] += binary .LittleEndian .Uint64 (ptr ) * k3
34
- ptr = ptr [8 :]
30
+ v [3 ] += binary .LittleEndian .Uint64 (ptr [24 :32 ]) * k3
35
31
v [3 ] = rotate_right (v [3 ], 29 ) + v [1 ]
32
+ ptr = ptr [32 :]
36
33
}
37
34
38
35
v [2 ] ^= rotate_right (((v [0 ]+ v [3 ])* k0 )+ v [1 ], 37 ) * k1
You can’t perform that action at this time.
0 commit comments