Merge pull request #13 from altendky/use_UINTxx_C_macros
Use UINTxx_C() macros for 'large' constantsmain
commit
61faf151b8
|
@ -70,8 +70,8 @@ int halfsiphash(const uint8_t *in, const size_t inlen, const uint8_t *k,
|
||||||
assert((outlen == 4) || (outlen == 8));
|
assert((outlen == 4) || (outlen == 8));
|
||||||
uint32_t v0 = 0;
|
uint32_t v0 = 0;
|
||||||
uint32_t v1 = 0;
|
uint32_t v1 = 0;
|
||||||
uint32_t v2 = 0x6c796765;
|
uint32_t v2 = UINT32_C(0x6c796765);
|
||||||
uint32_t v3 = 0x74656462;
|
uint32_t v3 = UINT32_C(0x74656462);
|
||||||
uint32_t k0 = U8TO32_LE(k);
|
uint32_t k0 = U8TO32_LE(k);
|
||||||
uint32_t k1 = U8TO32_LE(k + 4);
|
uint32_t k1 = U8TO32_LE(k + 4);
|
||||||
uint32_t m;
|
uint32_t m;
|
||||||
|
|
|
@ -79,10 +79,10 @@ int siphash(const uint8_t *in, const size_t inlen, const uint8_t *k,
|
||||||
uint8_t *out, const size_t outlen) {
|
uint8_t *out, const size_t outlen) {
|
||||||
|
|
||||||
assert((outlen == 8) || (outlen == 16));
|
assert((outlen == 8) || (outlen == 16));
|
||||||
uint64_t v0 = 0x736f6d6570736575ULL;
|
uint64_t v0 = UINT64_C(0x736f6d6570736575);
|
||||||
uint64_t v1 = 0x646f72616e646f6dULL;
|
uint64_t v1 = UINT64_C(0x646f72616e646f6d);
|
||||||
uint64_t v2 = 0x6c7967656e657261ULL;
|
uint64_t v2 = UINT64_C(0x6c7967656e657261);
|
||||||
uint64_t v3 = 0x7465646279746573ULL;
|
uint64_t v3 = UINT64_C(0x7465646279746573);
|
||||||
uint64_t k0 = U8TO64_LE(k);
|
uint64_t k0 = U8TO64_LE(k);
|
||||||
uint64_t k1 = U8TO64_LE(k + 8);
|
uint64_t k1 = U8TO64_LE(k + 8);
|
||||||
uint64_t m;
|
uint64_t m;
|
||||||
|
|
Loading…
Reference in New Issue