Skip to main content

Generate one time passwords

Project description

A command line interface for generating one time passwords as per RFC 4226 and RFC 6238

Requirements

  • Python version 3.6.x and greater

Installation

The way to install otp-gen is to use pip

$ pip3 install otp-gen

Getting Started

You need to provision secret key, issuer, user associated with token by using config command. Default values are shown if any.

$ otp config
Secret key: JBSWY3DPEHPK3PXP
Issuer: Foo
User: Bar
Period (30 seconds):
Digits (6):
Algorithm (SHA-256):

Usage

You can request a new OTP by using get command. A progress bar appears next to the code to indicate expiry period of it. get continuously provides valid codes until killed.

$ otp get
Code = 004790, progress [*****************-----------------------]

Current configuration can be embedded in a QR code by using qrcode command.

$ otp qrcode

References

License

otp-gen is under MIT license

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

otp_gen-0.1.2-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file otp_gen-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for otp_gen-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c7e2f66bd3f5dfc298e4ae5d949e26c5ee61936d81b2e7e76e80b8e215b42f71
MD5 e15f9ef2370abaec23418a60f68599b2
BLAKE2b-256 57e137c26c2674a4230b0babeb936ddb6d329ae13a93e206e897cdbd38c061e3

See more details on using hashes here.

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