https://github.com/pathawks/otpdec
One-Time Password decoder
https://github.com/pathawks/otpdec
Last synced: over 1 year ago
JSON representation
One-Time Password decoder
- Host: GitHub
- URL: https://github.com/pathawks/otpdec
- Owner: pathawks
- Created: 2022-12-12T01:06:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-12T05:42:05.000Z (over 3 years ago)
- Last Synced: 2025-01-22T05:41:45.892Z (over 1 year ago)
- Language: Rust
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MARKDOWN
Awesome Lists containing this project
README
# otpdec
This utility will decode a TOTP (Time-based One-Time Password) secret into a six digit authenticator code.
The motivation was a need for something that wasn't quite a password manager, but could still generate OTP codes. This can be used in combination with something like OpenPGP to script OTP generation, including putting the output on the clipboard with something like `pbcopy` or `xclip`:
```sh
gpg --decrypt ~/.otp/MyEmailAccount.gpg | otpdec | pbcopy
```
Input should be _only_ the secret, not the full `totp://` URL.
### Limitations
Currently, only SHA1 is supported.
Only 6 digit codes are generated.
Only 30-second time steps are supported.