projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd14d5d
)
Bypass __get_openssl_constructor() and always use our own blake2 implementation
author
Christian Heimes
<christian@python.org>
Wed, 7 Sep 2016 00:35:13 +0000
(
02:35
+0200)
committer
Christian Heimes
<christian@python.org>
Wed, 7 Sep 2016 00:35:13 +0000
(
02:35
+0200)
Lib/hashlib.py
patch
|
blob
|
history
diff --git
a/Lib/hashlib.py
b/Lib/hashlib.py
index 40ccdec351e2014a2041cc9d5d2e2a8fd0642837..2d5e92ea3387ef5c3913eb94278081179f8fdc89 100644
(file)
--- a/
Lib/hashlib.py
+++ b/
Lib/hashlib.py
@@
-101,6
+101,9
@@
def __get_builtin_constructor(name):
def __get_openssl_constructor(name):
+ if name in {'blake2b', 'blake2s'}:
+ # Prefer our blake2 implementation.
+ return __get_builtin_constructor(name)
try:
f = getattr(_hashlib, 'openssl_' + name)
# Allow the C module to raise ValueError. The function will be