verify_password
- pyhelpers.ops.verify_password(password, salt, key, iterations=None)[source]
Verify a password given salt and key.
- Parameters:
password (str | int | float | bytes) – input as a password
salt (bytes | str) – random data; see also [OPS-HP-1]
key (bytes | str) – PKCS#5 password-based key (produced by the function hashlib.pbkdf2_hmac())
iterations (int | None) –
size
of the function hashlib.pbkdf2_hmac(), i.e. number of iterations of SHA-256; whensalt_size=None
(default), it uses100000
- Returns:
whether the input password is correct
- Return type:
bool
See also
Examples of the function
pyhelpers.ops.hash_password()