A class that hashes a password with a unique salt and stores the hash. It can then validate a password against the hash.
To keep the class simple, it does not allow password changes. Instead, just create a new instance.
Javadoc hosted by Jitpack can be found here
The library is hosted on Jitpack. Gradle example:
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
dependencies {
compile 'no.iskra:hashedpassword:0.4+'
}
HashedPassword password = new HashedPassword("abc");
password.validate("abc"); // Returns true
password.validate("bcd"); // Returns false