A simple hashing wrapper with support for salts and peppers
Project description
CosmosHashLib
A simple hashing wrapper with support for salts and peppers
Installation
Use the package manager pip to install CosmosHashLib.
pip install CosmosHashLib
Usage
from CosmosHashLib import hashing
hashing.RandLen(73415123615248374531263482374652358413461324623874189024189236192837189237273452631741)
hashing.Pepper('secret pepper')
# returns string with hash and salts
# in format salt1$hash$salt2
# '9629480548280199683952534504439555097095034673943361626777618263219601140700721613182$df85bca92a6b4b87abda9e621aa5e662113b4fcbb0c022963e43c3b43a230956$4797f1dbb71ac12b5d8985421ed5b743879e1aba11a2beeab9c39b47c96d94fe'
hash = hashing.SHA256.HashSaltPepper('hash a string')
# returns True or False
hashing.SHA256.VerifySaltPepper('hash a string', hash)
# Use hashing.SHA1 for SHA1 hashes
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
CosmosHashLib-0.0.5.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for CosmosHashLib-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 067ce8f5019c51fe887562603f671e4b73d39de5a5aab4fb1f4f8ae3daf6c09f |
|
MD5 | a720fad2065c3569082d01e1bb170c9d |
|
BLAKE2b-256 | 32ddfc02fdc48e0aefd6ea91b19d4749334059786de7a5eb939f23381c15a19d |