A lightweight Python 2/3 package for handling HOTP/TOTP (Google Authenticator) authentication.
Project description
SpookyOTP
=========
Lightweight Python package for TOTP/HOTP (Google Authenticator) codes
Description
===========
This is a lightweight package for generating TOTP and HOTP codes used
for two-factor authentication. They can be used with Google Authenticator
or FreeOTP.
Some features (such as using different hashing algorithms or displaying
more than 6 digits) do not work with Google Authenticator.
Example
=======
from spookyotp import (get_random_secret, TOTP)
secret = get_random_secret(n_bytes=10)
totp = TOTP(secret, 'Example', 'user@example.org')
totp.save_qr_code('qr.png')
# you can now load the QR code with your app of choice
code = input("Enter code: ") # or raw_input in Python 2
matches = totp.compare(code)
if matches:
print("Correct!")
else:
print("Incorrect.")
Why Spooky?
===========
I created the git repo on Halloween, and there is already a project
called PyOTP.
=========
Lightweight Python package for TOTP/HOTP (Google Authenticator) codes
Description
===========
This is a lightweight package for generating TOTP and HOTP codes used
for two-factor authentication. They can be used with Google Authenticator
or FreeOTP.
Some features (such as using different hashing algorithms or displaying
more than 6 digits) do not work with Google Authenticator.
Example
=======
from spookyotp import (get_random_secret, TOTP)
secret = get_random_secret(n_bytes=10)
totp = TOTP(secret, 'Example', 'user@example.org')
totp.save_qr_code('qr.png')
# you can now load the QR code with your app of choice
code = input("Enter code: ") # or raw_input in Python 2
matches = totp.compare(code)
if matches:
print("Correct!")
else:
print("Incorrect.")
Why Spooky?
===========
I created the git repo on Halloween, and there is already a project
called PyOTP.
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
SpookyOTP-1.0.1.tar.gz
(6.3 kB
view hashes)
Built Distributions
SpookyOTP-1.0.1-py2.7.egg
(11.6 kB
view hashes)
Close
Hashes for SpookyOTP-1.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f0e2d7d74e274a6ca8a1ddaf8939cddb9e86adcafa9f97e850e199c053b463b |
|
MD5 | 9c04e03d6aaa52d7d1959d87f3665a5e |
|
BLAKE2b-256 | d8e8e7f550e211cc73f693b40ed11bc7f06f7f2c14ca7fef294cc7a845c3d80e |