Introduction • Getting started • Troubleshooting
fauth is a rolling keys generator which is commonly used for 2-factor authentication these days. The number sequences depend on a seed. The length of the sequence can also be specified.
I could lie and tell yout that this project has much use, but there are already far better and secure authenticators using secure algorithms. However, writing it yourself will enhance your understanding of the functionality. Moreover, you have all the control you want.
Should you use it? Absolutely not!
There is really not much to know about fauth. This project consists of only one class called Authenticator
Authenticator authenticator = new Authenticator(
System.currentTimeMillis(), // seed
6 // digits
);
After instantiating the authenticator, you have to call only one method called generate
authenticator.generate(index); // index > 0
You can specify which sequence should be calculated. However, keep in mind that index should be bigger that 0 and thus positiv. This index should be calculated by the elippsed time since creation in order to have a rolling key algorithm.