Jotp
OTP (One Time Password) utility in Java. To enable two-factor authentication (2FA) using HMAC-based) or Time-based algorithms.
Getting Started
- Maven
coming soon
. - Gradle
coming soon
. - Zip with examples
coming soon
.
Example of Time-based OTP:
OTP.generateTOTP("HelloWorld!", "" + System.currentTimeMillis(), 6)
Example of Counter-based OTP:
OTP.generateHOTP("HelloWorld!", "2", 6,)
Details
This code currently supports the standard HMAC-based (HOTP RFC 4226) and time-based (TOTP RFC 6238) algorithms for one-time passwords.
Credit
A project by Austin Delamar based off of Kamron Zafar's work and other contributors.