hkdf: Remove duplicate check if the salt is None

The second if isn't needed since we initialize the salt with zeroes
earlier. If instead we meant to pass an empty bytes class to the HMAC
implementation, the end result would be the same, since it's gonna get
padded with zeroes in the HMAC code.
pull/248/head
Dionysis Grigoropoulos 2023-03-01 16:22:51 +02:00
rodzic b381a61be8
commit ddb7a92c15
1 zmienionych plików z 0 dodań i 3 usunięć

Wyświetl plik

@ -39,9 +39,6 @@ def hkdf(length=None, derive_from=None, salt=None, context=None):
if salt == None or len(salt) == 0:
salt = bytes([0] * hash_len)
if salt == None:
salt = b""
if context == None:
context = b""