From 32a2ceead7ad86c1641f24b710c4d4683c1e98f3 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 7 Sep 2016 02:35:13 +0200 Subject: Bypass __get_openssl_constructor() and always use our own blake2 implementation --- Lib/hashlib.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v0.12