Skip to main content

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


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 hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page