Skip to main content

Generate a time-based OTP using SHA-256 hashing algorithm

Project description

OTP Generator

Generate a time-based OTP using SHA-256 hashing algorithm.

Installation

You can install the package using pip:

pip install ownotp

Usage

Create 6 digits otp. OTP will change 2 minutes once based on your_own_secrent.

from ownotp.otp import generate_otp

otp = generate_otp('your_own_secret')
print(otp)

To change interval time pass the value in seconds.

from ownotp.otp import generate_otp
otp = generate_otp('your_own_secret', interval=120)

To get 7 or 8 length otp.

from ownotp.otp import generate_otp
otp = generate_otp('your_own_secret', length=7)

To get hashed OTP. Mixed of char and numbers

from ownotp.otp import generate_otp
otp = generate_otp('your_own_secret', only_digits=False)

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

ownotp-0.1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ownotp-0.1.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file ownotp-0.1.0.tar.gz.

File metadata

  • Download URL: ownotp-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for ownotp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 42292ab791f1705664eb4fc594b09014e57cd03ee0a59985beba2aee8bf87416
MD5 e69489f83a222ef8cde6bb041c94581e
BLAKE2b-256 f945e92ae110031e421b6b366379389567bed2b470513af3d8e97538d7941387

See more details on using hashes here.

File details

Details for the file ownotp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ownotp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for ownotp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 027e27ae33079bb6d053e529ed7c9b67d0105f2dddcd504a27c400a6d44f029c
MD5 bd550538e3375f45bc529e662e7cdb62
BLAKE2b-256 be1c35d2d88126fec9f5442b9deebc2a79bd5959a0c1c12e8a00e440a029dcec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page