From a7d3fd93fc901de46fee0d3d9ce4b6422408965d Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 15 Feb 2019 01:21:24 +0000 Subject: [PATCH] `hmac.digest` -> `hmac.new` (the former is too new) (sasl.scram) --- modules/sasl/scram.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sasl/scram.py b/modules/sasl/scram.py index 80c6cbad..b3c75313 100644 --- a/modules/sasl/scram.py +++ b/modules/sasl/scram.py @@ -48,7 +48,7 @@ class SCRAM(object): return dict((piece[0], piece[1]) for piece in pieces) def _hmac(self, key: bytes, msg: bytes) -> bytes: - return hmac.digest(key, msg, self._algo) + return hmac.new(key, msg, self._algo).digest() def _hash(self, msg: bytes) -> bytes: return hashlib.new(self._algo, msg).digest()