diff options
author | Inada Naoki <songofacandy@gmail.com> | 2021-10-10 08:29:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-10 08:29:46 (GMT) |
commit | ad970e8623523a8656e8c1ff4e1dff3423498a5a (patch) | |
tree | ddd33e1925765792c97a500b6d8bf88ca899d53c /Include | |
parent | a1c3c9e8245a88cf37b084869b3559638116daf7 (diff) | |
download | cpython-ad970e8623523a8656e8c1ff4e1dff3423498a5a.zip cpython-ad970e8623523a8656e8c1ff4e1dff3423498a5a.tar.gz cpython-ad970e8623523a8656e8c1ff4e1dff3423498a5a.tar.bz2 |
bpo-29410: Change the default hash algorithm to SipHash13. (GH-28752)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Include')
-rw-r--r-- | Include/pyhash.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Include/pyhash.h b/Include/pyhash.h index a314ea9..182d223 100644 --- a/Include/pyhash.h +++ b/Include/pyhash.h @@ -114,11 +114,10 @@ PyAPI_FUNC(PyHash_FuncDef*) PyHash_GetFuncDef(void); /* hash algorithm selection * - * The values for Py_HASH_SIPHASH24 and Py_HASH_FNV are hard-coded in the + * The values for Py_HASH_* are hard-coded in the * configure script. * - * - FNV is available on all platforms and architectures. - * - SIPHASH24 only works on platforms that don't require aligned memory for integers. + * - FNV and SIPHASH* are available on all platforms and architectures. * - With EXTERNAL embedders can provide an alternative implementation with:: * * PyHash_FuncDef PyHash_Func = {...}; @@ -128,10 +127,11 @@ PyAPI_FUNC(PyHash_FuncDef*) PyHash_GetFuncDef(void); #define Py_HASH_EXTERNAL 0 #define Py_HASH_SIPHASH24 1 #define Py_HASH_FNV 2 +#define Py_HASH_SIPHASH13 3 #ifndef Py_HASH_ALGORITHM # ifndef HAVE_ALIGNED_REQUIRED -# define Py_HASH_ALGORITHM Py_HASH_SIPHASH24 +# define Py_HASH_ALGORITHM Py_HASH_SIPHASH13 # else # define Py_HASH_ALGORITHM Py_HASH_FNV # endif /* uint64_t && uint32_t && aligned */ |