summaryrefslogtreecommitdiffstats
path: root/Lib/hashlib.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-07 00:35:13 (GMT)
committerChristian Heimes <christian@python.org>2016-09-07 00:35:13 (GMT)
commit32a2ceead7ad86c1641f24b710c4d4683c1e98f3 (patch)
tree97f1628c30230cc7cdff5439f426c34a31b44bdf /Lib/hashlib.py
parentcd14d5d29931d5f0bafa65b8233609de869220bc (diff)
downloadcpython-32a2ceead7ad86c1641f24b710c4d4683c1e98f3.zip
cpython-32a2ceead7ad86c1641f24b710c4d4683c1e98f3.tar.gz
cpython-32a2ceead7ad86c1641f24b710c4d4683c1e98f3.tar.bz2
Bypass __get_openssl_constructor() and always use our own blake2 implementation
Diffstat (limited to 'Lib/hashlib.py')
-rw-r--r--Lib/hashlib.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/hashlib.py b/Lib/hashlib.py
index 40ccdec..2d5e92e 100644
--- 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