eric6/Utilities/crypto/py3PBKDF2.py

changeset 7259
7c017076c12e
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7258:aff39db4dacc 7259:7c017076c12e
69 @param digestMod hash function 69 @param digestMod hash function
70 @param iterations number of times hash function should be applied (integer) 70 @param iterations number of times hash function should be applied (integer)
71 @param saltSize size of the salt (integer) 71 @param saltSize size of the salt (integer)
72 @return hashed password entry according to PBKDF2 specification (string) 72 @return hashed password entry according to PBKDF2 specification (string)
73 """ 73 """
74 digestname, iterations, salt, pwHash = \ 74 digestname, iterations, salt, pwHash = hashPasswordTuple(
75 hashPasswordTuple(password, digestMod, iterations, saltSize) 75 password, digestMod, iterations, saltSize)
76 return Delimiter.join([ 76 return Delimiter.join([
77 digestname, 77 digestname,
78 str(iterations), 78 str(iterations),
79 base64.b64encode(salt).decode("ascii"), 79 base64.b64encode(salt).decode("ascii"),
80 base64.b64encode(pwHash).decode("ascii") 80 base64.b64encode(pwHash).decode("ascii")

eric ide

mercurial