moved endianness convertion of k0 and k1, below the declations to conform to C90 and changed convertion method to be le64_to_cpu
This commit is contained in:
parent
5c482fb5b1
commit
e0877e6aff
@ -66,12 +66,12 @@ int ts3init_siphash(u64 *out, const u8 *in, u64 inlen, u64 k0, u64 k1) {
|
||||
u64 v2 = 0x6c7967656e657261ULL;
|
||||
u64 v3 = 0x7465646279746573ULL;
|
||||
u64 b;
|
||||
k0 = cpu_to_le64(k0);
|
||||
k1 = cpu_to_le64(k1);
|
||||
u64 m;
|
||||
int i;
|
||||
const u8 *end = in + inlen - (inlen % sizeof(u64));
|
||||
const int left = inlen & 7;
|
||||
k0 = le64_to_cpu(k0);
|
||||
k1 = le64_to_cpu(k1);
|
||||
b = ((u64)inlen) << 56;
|
||||
v3 ^= k1;
|
||||
v2 ^= k0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user