The documentation lists the function signature as follows: hashlib.pbkdf2_hmac(name, password, salt, rounds, dklen=None) Some parameter names are wrong. The correct signature is: hashlib.pbkdf2_hmac(hash_name, password, salt, iterations, dklen=None) -- Thia