[issue19183] PEP 456 Secure and interchangeable hash algorithm

Serhiy Storchaka report at bugs.python.org
Mon Oct 28 16:18:09 CET 2013


Serhiy Storchaka added the comment:

Christian, why PY_HASH_EXTERNAL is here? Do you plan use it any official build? I think that in custom build of Python whole files pyhash.c and pyhash.h can be replaced.

When you will get rid from PY_HASH_EXTERNAL, then you could get rid from PyHash_FuncDef, PyHash_Func, etc.

Why _Py_HashDouble() and _Py_HashPointer() are moved to pyhash.c? They are hash algorithm agnostic, and it is unlikely they will be redefined in custom build.

You not need the HAVE_ALIGNED_REQUIRED macros if use PY_UHASH_CPY (or something like for exact 64 bit) in siphash24. On platforms where aligned access is required you will use per-bytes copy, otherwise you will use fast 64-bit copy.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19183>
_______________________________________


More information about the Python-bugs-list mailing list