public interface HashingStrategy
Modifier and Type | Method and Description |
---|---|
HashingAlgorithm |
get(String id)
Get an algorithm interface by its Id
|
String |
hash(String id,
Map<String,String> params,
String salt,
String password)
Hashes a password.
|
static HashingStrategy |
load()
Factory method to load the algorithms from the system
|
HashingStrategy |
put(String id,
HashingAlgorithm algorithm)
Put or replace an algorithm into the list of system loaded algorithms.
|
boolean |
verify(String hash,
String password)
Time constant password check.
|
static HashingStrategy load()
String hash(String id, Map<String,String> params, String salt, String password)
id
- the algorithm idparams
- the algorithm specific parameterssalt
- the given saltpassword
- the given passwordboolean verify(String hash, String password)
hash
- the hash to verifypassword
- the password to test againstHashingAlgorithm get(String id)
id
- the algorithm idHashingStrategy put(String id, HashingAlgorithm algorithm)
id
- the algorithm idalgorithm
- the implementationCopyright © 2024 Eclipse. All rights reserved.