Set SHA-256 as default hash for HMAC

This commit is contained in:
Mark Qvist 2022-06-07 17:33:08 +02:00
parent b2b6708e8f
commit 301661c29e
2 changed files with 3 additions and 3 deletions

View file

@ -6,7 +6,7 @@ def hkdf(length=None, derive_from=None, salt=None, context=None):
hash_len = 32
def hmac_sha256(key, data):
return HMAC.new(key, data, hashlib.sha256).digest()
return HMAC.new(key, data).digest()
if length == None or length < 1:
raise ValueError("Invalid output key length")