To use Salted MD5:
from saltedmd5 import Salting
# user = Salting(<password>, <grams-of-salt>)
user_1 = Salting('mypassword', <grams-of-salt>)
user_1.seasoning()
Result:
user_1.showinfo()
{
'password': 'mypassword',
'salted_password': '45f6717a673f740c636479a9b7b98b9c',
'salt': '8LG6et9315DjPuupKBpD'
}
''' check_authentication(<to-be-checked-password>) '''
user_1.check_authentication('mypassword')
Passwords matched!!
''' create_json(<name-of-file>) '''
user_1.create_json('user_1')
JSON created!!
.seasoning()
.show_info()
create_json(name_of_file)
check_authentication(new_user_password)
saltedmd5 can be installed from PyPI:
pip install saltedmd5
saltedmd5 is a work based on hashlib. It aims to provide developers with a Python functionality to generate simple salted password hashing which concerns the security of user account systems.
Please refer to CHANGELOG
Everybody is welcome, please feel free to get on board :)