diff options
Diffstat (limited to 'distixapi/authn.py')
-rw-r--r-- | distixapi/authn.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/distixapi/authn.py b/distixapi/authn.py index a7fbbcf..f95f74d 100644 --- a/distixapi/authn.py +++ b/distixapi/authn.py @@ -2,6 +2,7 @@ import base64 +import scrypt def get_credentials(request): @@ -30,3 +31,8 @@ def get_credentials(request): class AuthenticationError(Exception): pass + + + +def encrypt_password(salt, password): + return scrypt.hash(password, salt) |