A modern graphical user interface for generating TOTP (Time-based One-Time Password) codes according to RFC 6238.
- TOTP code generation with multiple hash algorithms
- Support for standard TOTP URIs (otpauth://)
- Modern and intuitive user interface using Toga
- Automatic code updates
- Progress bar to visualize remaining time
- Quick clipboard copy
- Cross-platform support (Windows, Linux, macOS)
- Python 3.11+
- pip (Python package manager)
pip install -r requirements.txt
python -m src.app
The application accepts two types of inputs:
- Base32 Secret Key (e.g., JBSWY3DPEHPK3PXP)
- Complete TOTP URI:
otpauth://totp/Example:[email protected]?secret=JBSWY3DPEHPK3PXP&issuer=Example&algorithm=SHA1&digits=6&period=30
- Secret: Base32 secret key
- Period: Refresh interval (in seconds, default: 30)
- Digits: Code length (6-8 digits)
- Algorithm: Multiple supported hash algorithms including:
- SHA1 (default)
- SHA256
- SHA512
- And more...
-
Enter Secret:
- Type or paste your Base32 secret key
- Or paste a complete TOTP URI
-
Configure Parameters:
- Adjust the period if needed (default: 30 seconds)
- Select number of digits (6-8)
- Choose hash algorithm
-
Generate Code:
- Click "Generate" button
- Code will auto-update based on period
- Progress bar shows time until next update
-
Copy Code:
- Click "Copy" button to copy code to clipboard
- A confirmation message will appear briefly
totp-gui/
├── src/
│ ├── __init__.py
│ ├── app.py
│ ├── totp.py
│ ├──resources/
│ └── TOTP.png
│ └── views/
│ ├── __init__.py
│ └── main_window.py
├── requirements.txt
└── README.md
- toga: Cross-platform GUI framework
- pyperclip: Clipboard management
- cryptography: Cryptographic functions
This project is licensed under the MIT License.
- Minimum 6 digits recommended for TOTP codes
- Store secret keys securely
- Use secure hash algorithms (SHA1 minimum)