Skip to main content

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 out Initializing 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


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)

Uploaded Source

Built Distribution

CryptoTokenAuth-1.0.0-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

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