Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moshthepitt/django-usercake-password-hasher
Use this class to authenticate against Usercake (http://usercake.com/) password strings. When importing passwords from Usercake, the database values should be prefixed with "usercake$".
https://github.com/moshthepitt/django-usercake-password-hasher
Last synced: 8 days ago
JSON representation
Use this class to authenticate against Usercake (http://usercake.com/) password strings. When importing passwords from Usercake, the database values should be prefixed with "usercake$".
- Host: GitHub
- URL: https://github.com/moshthepitt/django-usercake-password-hasher
- Owner: moshthepitt
- Created: 2014-04-19T11:38:23.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-04-19T11:57:37.000Z (almost 11 years ago)
- Last Synced: 2024-04-16T02:16:00.002Z (10 months ago)
- Language: Python
- Size: 137 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Django Usercake Password Hasher
===============================Authenticate against Usercake passwords in Django.
(http://usercake.com/)Use this class to authenticate against Usercake password strings. When importing passwords from Usercake, the database values should be prefixed with "usercake$".
Usercake passwords consist of a 65 character string.
* The first 25 characters are the salt
* The next block of 40 characters is the password encrypted using Sha1 and the salt* * *
h = UserCakePasswordHasher()
h.verify("123456789", "usercake$860b4cefa917c430ed85d89525e0158d5be9e1515333a9dcfefd51a2419a119d1")
Truer = h.encode("123456789")
h.verify("123456789", r)
True-----------------------------
To use, put this in any app and add to your settings.py, something like this:
PASSWORD_HASHERS = (
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
'myproject.myapp.usercake_hasher.UserCakePasswordHasher',
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
'django.contrib.auth.hashers.BCryptPasswordHasher',
'django.contrib.auth.hashers.SHA1PasswordHasher',
'django.contrib.auth.hashers.MD5PasswordHasher',
'django.contrib.auth.hashers.CryptPasswordHasher',
)