hmac.digest
-> hmac.new
(the former is too new) (sasl.scram)
This commit is contained in:
parent
4e7bfee3a6
commit
a7d3fd93fc
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ class SCRAM(object):
|
||||||
return dict((piece[0], piece[1]) for piece in pieces)
|
return dict((piece[0], piece[1]) for piece in pieces)
|
||||||
|
|
||||||
def _hmac(self, key: bytes, msg: bytes) -> bytes:
|
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:
|
def _hash(self, msg: bytes) -> bytes:
|
||||||
return hashlib.new(self._algo, msg).digest()
|
return hashlib.new(self._algo, msg).digest()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue