hashsystem helps developers generate hash passwords and generate token and decode token,that can be used in jwt ,apitokens,any kind of encription and decription process.
Project description
UseCases Docs
# generating password hash and validating it
from hashsystem.hash.package import HashMachenism
# HashMachenism takes seeds as params for password salt
seeds={"seeds":[1,2,1,2]}
obj=HashMachenism(seeds)
dummypassword="testingtestpassword"
password_hash=obj.hasspass(dummypassword)
# output '$RMA-b@1c#2i(8a~0a~0b@1c#2i(8a~0a~0b@1c#2i(8a~0a~0b@1c#2i(8a~0a~0b@1c#2i(8a~0a~0b@1c#2i(8a~0a~0b@1c#2i(8a~0a~0b@1c#2i(8a~0a~0b@1c#2i(8a~0a~0'
# verifying pasword hash
obj.verify_password(password_hash) # returns True if verified
Generating token and and decoding it
# imports for token generation
from hashsystem.hash.package import TokenGenerator
from datetime import datetime
# common vars
payload=dict(email="test@test.com",exp=datetime.now())
seeds=[1000,"%",20]
obj=TokenGenerator(payload,seeds)
token_hash=obj.get_token_pairs()
# decode token
decoded=obj.get_formetted_token(token_hash['access_token'])
# please checkout documentaion for further implementation for token related features
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hashsystem-token-1.10.tar.gz
(3.7 kB
view details)
File details
Details for the file hashsystem-token-1.10.tar.gz
.
File metadata
- Download URL: hashsystem-token-1.10.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d0007322b4757624d52cc1d5422aafee47b53a5094032f74aea465dc2069f90 |
|
MD5 | a99ce7a28d819f107ebad33818682b58 |
|
BLAKE2b-256 | 07ef9a8e7c996eb7da85af56b55add5f817db66b7f38021740680710fde4ebb0 |