Implements one time password of HOTP/TOTP
Project description
One time password implementations in Python. HOTP and TOTP.
Documentation: https://otp.authlib.org/ GitHub: https://github.com/authlib/otpauth
Usage
Most of the time, you would use a time based one time password. You can generate and verify the token with HOTP:
import otpauth totp = otpauth.HOTP(b"user-secret") # generate a code for now code: int = totp.generate() # you may want to convert it to string str_code: str = totp.string_code(code) # verify the code totp.verify(code) # => True totp.verify(str_code) # => 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
otpauth-2.0.0.tar.gz
(5.7 kB
view details)
Built Distribution
File details
Details for the file otpauth-2.0.0.tar.gz
.
File metadata
- Download URL: otpauth-2.0.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24f41509f9b99c2fd8aef386eefe3a2d58b7601ec23d4af41c487bcee3954359 |
|
MD5 | 4e87b5f44383abe44de46713b7c95675 |
|
BLAKE2b-256 | ff7a8399b7f910e2a50fd40e502d9cd479d2870c94660a27aa13cfa6c0d81810 |
File details
Details for the file otpauth-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: otpauth-2.0.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e35fb34f8424712f6fa322686f0360e830b073832b9ba65726dd875e1a506a73 |
|
MD5 | 6759b6e5a1d7a6c6394664870e56a023 |
|
BLAKE2b-256 | d6d81cba461b1dc921dce8c65b97e13e03df31fc57f98b257359a597f1680a0a |