package documentation
Password tools.
From __init__.py
:
Function | check |
Check if a password matches a hash. |
Function | compare |
Compares two Strings in a safe way to prevent timing attacks. |
Function | encode |
Encode a password into a hash. |
Function | _pbkdf2 |
Undocumented |
Function | _random |
Undocumented |
Compares two Strings in a safe way to prevent timing attacks.
Parameters | |
a:str | 1st String. |
b:str | 2nd String. |
Returns | |
bool | True if a equals b, False otherwise. |
Encode a password into a hash.
Parameters | |
password:str | String password. |
algo:str | Hashing algorithm. Default is SHA512. |
Returns | |
str | Respective hash value in the format $algorithm$salt$hash. |