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") |