Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uasi/inko-totp
A TOTP token generator and validator for Inko.
https://github.com/uasi/inko-totp
Last synced: 17 days ago
JSON representation
A TOTP token generator and validator for Inko.
- Host: GitHub
- URL: https://github.com/uasi/inko-totp
- Owner: uasi
- License: mpl-2.0
- Created: 2023-08-09T03:47:32.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-30T19:12:36.000Z (5 months ago)
- Last Synced: 2024-11-05T20:50:22.782Z (2 months ago)
- Language: Makefile
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# inko-totp
A Time-Based One-Time Password (TOTP) token generator and validator for the Inko programming language.
This implementation is based on [RFC 6238](https://www.rfc-editor.org/rfc/rfc6238).
## Examples
import totp (Totp)
let base32_encoded_secret = 'GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ'
let totp = Totp.with_secret(base32_encoded_secret)totp.generate # => '012345', for example (depends on the current time)
totp.validate('012345') # => true (again, depends on the current time)