diff options
author | Christian Heimes <christian@python.org> | 2016-09-07 00:35:13 (GMT) |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2016-09-07 00:35:13 (GMT) |
commit | 32a2ceead7ad86c1641f24b710c4d4683c1e98f3 (patch) | |
tree | 97f1628c30230cc7cdff5439f426c34a31b44bdf /Lib/hashlib.py | |
parent | cd14d5d29931d5f0bafa65b8233609de869220bc (diff) | |
download | cpython-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.py | 3 |
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 |