Token utilities
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
Utilities to generate and verify tokens (autodeprecating or not).
Currently implemented :
Time-based One-time Password (TOTP)
TOTP Example
Below is an example of a token based on TOTP, self-deprecating after a given number of seconds
from roughrider.token.hmac_factories import TOTTokenFactory
factory = TOTTokenFactory(secret=b'secret', TTL=180) # 3 min TTL
token = factory.generate('my word')
assert factory.challenge(token, 'my word') is True
assert factory.challenge(token, 'my other word') is False
CHANGES
0.1 (2021-10-09)
Initial release.
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
roughrider.token-0.1.tar.gz
(5.9 kB
view details)
File details
Details for the file roughrider.token-0.1.tar.gz.
File metadata
- Download URL: roughrider.token-0.1.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99a7c4c4576ef56dbd23ab58adf8e34510a6a5e37a1c571e8798d4f393546e82
|
|
| MD5 |
c1ff5862a18b32c4d47ac63a435881ec
|
|
| BLAKE2b-256 |
b1ca6623f7fbea37957c86f7bed0fbf947f6da17f9f233425505cd3951e0a2db
|