This repository has been archived on 2023-09-20. You can view files and clone it, but cannot push or open issues or pull requests.
py-libreauth/docs/password.rst

29 lines
512 B
ReStructuredText
Raw Normal View History

2017-12-17 00:40:03 +01:00
Password module
===============
Hashing a password
------------------
::
from libreauth.password import *
password = b'my super secret password'
hashed = password_hash(password)
Verifying a password against the hash
-------------------------------------
::
from libreauth.password import *
password = b'user submited password'
hashed = ''
if is_valid(password, hashed):
// Successful authentication
pass
else:
// Failed authentication
pass