Skip to content

Commit

Permalink
đź“ťAdd documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathawat-GH committed Mar 26, 2024
1 parent 373be2c commit c4500a0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# Simple-TOTP
Simple TOTP Program using Python.

This repository contains the code for a simple Time-based One-Time Password (TOTP) generator.

## Usage

1. Install the required dependencies by running `pip install pyotp`.
2. Add secret and password in `secret key` `password here`
3. Run the `main.py` script to generate a TOTP.

## Build to exe

1. Install pyinstaller by running `pip install pyinstaller`
2. Build by running `pyinstaller main.py --onefile --noconsole`

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.

## Acknowledgements

Special thanks to the developers of [pyotp](https://github.com/pyotp/pyotp) for providing the library used in this project.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import os
import tkinter as tk

totp = pyotp.TOTP("")
totp = pyotp.TOTP("secret key")

def check_password():
password = password_entry.get()
if password == "":
if password == "password here":
def update_totp():
current_totp = totp.now()
totp_label.config(text="Current TOTP: \n" + current_totp) # Update the label with current TOTP
Expand Down

0 comments on commit c4500a0

Please sign in to comment.