Interface SaltedHashService
- All Known Implementing Classes:
JCASaltedHashService,NoSaltedHashService
public interface SaltedHashService
Interface for creating salted hashes from plaintext passwords and for validating passwords against stored salted hashes.
- Author:
- Peter Palaga
-
Method Summary
-
Method Details
-
getSaltedHash
Computes a salted hash of given plaintext password suitable for storing in a database.- Throws:
SaltedHashException
-
validate
Checks whether given plaintextpasswordcorresponds to the givensaltedHash.- Parameters:
password-saltedHash-- Returns:
trueif the givenpasswordmatches the givensaltedHash;falseotherwise.- Throws:
SaltedHashException- if thesaltedHashcannot be parsed or if the hashing algorithm is not available.
-