Merge pull request #6 from zx2c4/master
halfsiphash: 4 byte chunks, not 8, so compute leftover correctlymain
commit
7a9d53a81d
|
@ -83,7 +83,7 @@ int halfsiphash(const uint8_t *in, const size_t inlen, const uint8_t *k,
|
||||||
uint32_t m;
|
uint32_t m;
|
||||||
int i;
|
int i;
|
||||||
const uint8_t *end = in + inlen - (inlen % sizeof(uint32_t));
|
const uint8_t *end = in + inlen - (inlen % sizeof(uint32_t));
|
||||||
const int left = inlen & 7;
|
const int left = inlen & 3;
|
||||||
uint32_t b = ((uint32_t)inlen) << 24;
|
uint32_t b = ((uint32_t)inlen) << 24;
|
||||||
v3 ^= k1;
|
v3 ^= k1;
|
||||||
v2 ^= k0;
|
v2 ^= k0;
|
||||||
|
|
Loading…
Reference in New Issue