[issue35600] Expose siphash

Steven D'Aprano report at bugs.python.org
Fri Dec 28 02:09:18 EST 2018


Steven D'Aprano <steve+python at pearwood.info> added the comment:

> Steven, my requirement calls for same hash on multiple machines. 
> Python's hash (for strings) is keyed with a random value.

Ah, of course it does, I forgot about that.

The only problem with exposing siphash is that we are exposing a private 
implementation detail (the specific hash function used) as a public 
interface. That means that we'd need to keep siphash forever, even if we 
want to use a different hash function in the future.

Now maybe we're willing to do that, perhaps exposing it through the 
hashlib module, with no guarantee that it is related in any way to what 
hash() calls. But I think now we're moving in Python-Ideas mailing list 
territory, and as Benjamin points out, there is a third-party library.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35600>
_______________________________________


More information about the Python-bugs-list mailing list