[issue35600] Expose siphash

2018-12-27 Thread Steven D'Aprano
Steven D'Aprano 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

[issue35600] Expose siphash

2018-12-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: How about using one of these modules? https://pypi.org/search/?q=siphash -- nosy: +benjamin.peterson ___ Python tracker ___

[issue35600] Expose siphash

2018-12-27 Thread Dima Tisnek
Dima Tisnek added the comment: Steven, my requirement calls for same hash on multiple machines. Python's hash (for strings) is keyed with a random value. You are correct that `hash(tuple(map(ord, str(something` is stable. In the worst case, I could override `PYTHONHASHSEED` globally. I

[issue35600] Expose siphash

2018-12-27 Thread Steven D'Aprano
Steven D'Aprano added the comment: > In the old days I'd just `hash(some_variable)` but of course now I cannot. I'm sorry, I don't understand... why can't you? py> text = "NOBODY expects the Spanish Inquisition!" py> hash(text) 1245575277 There's also this: py>

[issue35600] Expose siphash

2018-12-27 Thread Dima Tisnek
New submission from Dima Tisnek : Just recently, i found rolling my own simple hash for strings. (task was to distribute tests across executors, stably across invocations, no external input, no security) In the old days I'd just `hash(some_variable)` but of course now I cannot.