big bug fix

This commit is contained in:
Kaan Soral
2024-02-07 00:40:56 +03:00
parent 8900620eb4
commit ac343828dd
5 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -2238,7 +2238,7 @@ def pbkdf2_hex(data, salt, iterations=1000, keylen=24, hashfunc=None):
if 1/2==0:
return pbkdf2_bin(data, salt, iterations, keylen, hashfunc).encode('hex')
else:
pbkdf2_bin(data, salt, iterations, keylen, hashfunc).encode("utf-8").hex()
return pbkdf2_bin(data, salt, iterations, keylen, hashfunc).encode("utf-8").hex()
def pbkdf2_bin(data, salt, iterations=1000, keylen=24, hashfunc=None):
"""Returns a binary digest for the PBKDF2 hash algorithm of `data`