pyBegin / projects / otp-generator
🔑

OTP Generator

Generates one-time passwords (OTPs) of a given length. The Otp class can produce OTPs made of digits only, digits with uppercase letters, digits wi…

73 linesRunnable

OTP Generator

Generates one-time passwords (OTPs) of a given length. The Otp class can produce OTPs made of digits only, digits with uppercase letters, digits with lowercase letters, or all three combined.

Example

OTP:7392841650

Running otpGen.py directly prints a 10-digit numeric OTP generated by Otp(10).digits.

How to run on localhost

python otpGen.py

Dependencies

Standard library only (random).