Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 

README.md

TOTP - Time-Based One-Time Password Algorithm Library

RFC6238 Java implementation that is compatibile with Google Authenticator Application.

Provides utility class for generating links for QR codes that can be scanned by Goodle Authenticator. It is also capable of generating authentication codes as well as their verification.

It is very easy to use:

TOTPManager manager = new TOTPManager();

byte[] secret = Secret.generate();

// generate Google Authenticator QR Code
String encoded = Secret.toBase32(secret);
String qr = GoogleAuthenticator.getQRUrl("jdoe", "example.com", encoded);

// generate TOTP code
int code = manager.generate(secret);
boolean valid = manager.validate(secret, code); // by default code is valid for 60 seconds

Demo available for preview at: http://security-totp.appspot.com/

About

Time-Based One-Time Password Algorithm Java Library

Topics

Resources

Languages

You can’t perform that action at this time.