| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 42aa93b commit 4e3e156
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,3 @@ | |||
| 1 | + Don't byte swap the input keys to the SipHash algorithm on big-endian | ||
| 2 | + platforms. This should ensure siphash gives consistent results across | ||
| 3 | + platforms. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -364,9 +364,7 @@ static PyHash_FuncDef PyHash_Func = {fnv, "fnv", 8 * SIZEOF_PY_HASH_T, | |||
| 364 | 364 | ||
| 365 | 365 | ||
| 366 | 366 | static uint64_t | |
| 367 | - siphash24(uint64_t key0, uint64_t key1, const void *src, Py_ssize_t src_sz) { | ||
| 368 | - uint64_t k0 = _le64toh(key0); | ||
| 369 | - uint64_t k1 = _le64toh(key1); | ||
| 367 | + siphash24(uint64_t k0, uint64_t k1, const void *src, Py_ssize_t src_sz) { | ||
| 370 | 368 | uint64_t b = (uint64_t)src_sz << 56; | |
| 371 | 369 | const uint64_t *in = (uint64_t*)src; | |
| 372 | 370 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments