A token authentication method.
Project description
CryptoAuthToken
A way for authenticating using token with cryptographic encryption system.
Installation
- Install Package Using
pip
python3 pip install CryptoAuthToken
How to use:
-
Note:
After installing First time if you try to use or import this, it will print outInitializing CryptoTokenAuth for the first time.We generate random cerdentials to keep this secure.
and exit. this is the way it works it will only happen for the first time.it creates random cerdentials so you'r Token salt is totally random from others. -
Creating a Token
from CryptoAuthToken import CryptoToken CryptoToken = CryptoToken(key='Mysecretkey') token = CryptoToken.create() print(token) >>gAAAAABg0fTUjXv1D62TrwaQ==.....
-
Validating Token.
If the token was created with the same key then it's a valid token.Returns: Boolean
from CryptoAuthToken import CryptoToken CryptoToken = CryptoToken(key='Mysecretkey') token = 'gAAAAABg0fTUjXv1D62TrwaQ==...' is_valid = CryptoToken.authenticate(token=token) print(is_valid) >> True
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
CryptoTokenAuth-1.0.0.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for CryptoTokenAuth-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88e786eb3b782b192f72c44ec5627c5fa07fc7b972d1576e02cad2fbc4ff5d0a |
|
MD5 | 620de7e5beb9fb590aaadeab04ae75c9 |
|
BLAKE2b-256 | fe2c474b550ef09f8c7192c5d48f21750260eb3137649d79ddb2ff3e84b5e871 |