Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 40 million developers.Sign up
First release of Time-Base One-Time Password Algorithm Library. Allows generation and validation of time-based authentication codes as well as provides compatibility with Google Authenticator application and can generate URL to QR codes that can be scanned for easy data entry.
It is also very easy to use:
TOTP totp = new TOTP(); byte secret = TOTPSecret.generate(); String encoded = TOTPSecret.encode(secret); String qr = GoogleAuthenticator.getQRUrl("jdoe", "example.com", encoded); byte decoded = TOTPSecret.decode(key); int code = totp.generate(secret); boolean valid = totp.validate(decoded, code);
Demo available for preview at: http://security-totp.appspot.com/