mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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>
This commit is contained in:
parent
a1c3c9e824
commit
ad970e8623
11 changed files with 123 additions and 26 deletions
|
@ -3036,16 +3036,19 @@ fi
|
|||
# str, bytes and memoryview hash algorithm
|
||||
AH_TEMPLATE(Py_HASH_ALGORITHM,
|
||||
[Define hash algorithm for str, bytes and memoryview.
|
||||
SipHash24: 1, FNV: 2, externally defined: 0])
|
||||
SipHash24: 1, FNV: 2, SipHash13: 3, externally defined: 0])
|
||||
|
||||
AC_MSG_CHECKING(for --with-hash-algorithm)
|
||||
dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
|
||||
AC_ARG_WITH(hash_algorithm,
|
||||
AS_HELP_STRING([--with-hash-algorithm=@<:@fnv|siphash24@:>@],
|
||||
[select hash algorithm for use in Python/pyhash.c (default is SipHash24)]),
|
||||
AS_HELP_STRING([--with-hash-algorithm=@<:@fnv|siphash13|siphash24@:>@],
|
||||
[select hash algorithm for use in Python/pyhash.c (default is SipHash13)]),
|
||||
[
|
||||
AC_MSG_RESULT($withval)
|
||||
case "$withval" in
|
||||
siphash13)
|
||||
AC_DEFINE(Py_HASH_ALGORITHM, 3)
|
||||
;;
|
||||
siphash24)
|
||||
AC_DEFINE(Py_HASH_ALGORITHM, 1)
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue