public class HashingStrategyImpl extends Object implements HashingStrategy
| Constructor and Description |
|---|
HashingStrategyImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(HashingAlgorithm algorithm) |
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.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloadpublic void add(HashingAlgorithm algorithm)
public String hash(String id, Map<String,String> params, String salt, String password)
HashingStrategyhash in interface HashingStrategyid - the algorithm idparams - the algorithm specific paramterssalt - the given saltpassword - the given passwordpublic boolean verify(String hash, String password)
HashingStrategyverify in interface HashingStrategyhash - the hash to verifypassword - the password to test againstpublic HashingAlgorithm get(String id)
HashingStrategyget in interface HashingStrategyid - the algorithm idpublic HashingStrategy put(String id, HashingAlgorithm algorithm)
HashingStrategyput in interface HashingStrategyid - the algorithm idalgorithm - the implementationCopyright © 2020. All rights reserved.