HashingStrategy
. The new
implementation is backend agnostic and follows a standard format that can be reused across different storages.@Deprecated public interface JDBCHashStrategy
Modifier and Type | Method and Description |
---|---|
String |
computeHash(String password,
String salt,
int version)
Deprecated.
Compute the hashed password given the unhashed password and the salt
|
static JDBCHashStrategy |
createPBKDF2(Vertx vertx)
Deprecated.
Implements a Hashing Strategy as per https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet (2018-01-17).
|
static JDBCHashStrategy |
createSHA512(Vertx vertx)
Deprecated.
This is the current backwards compatible hashing implementation, new applications should prefer the
PBKDF2 implementation, unless the tradeoff between security and CPU usage is an option.
|
String |
generateSalt()
Deprecated.
Compute a random salt.
|
String |
getHashedStoredPwd(JsonArray row)
Deprecated.
Retrieve the hashed password from the result of the authentication query
|
String |
getSalt(JsonArray row)
Deprecated.
Retrieve the salt from the result of the authentication query
|
static boolean |
isEqual(String hasha,
String hashb)
Deprecated.
Time constant string comparision to avoid timming attacks.
|
void |
setNonces(JsonArray nonces)
Deprecated.
Sets a ordered list of nonces where each position corresponds to a version.
|
static JDBCHashStrategy createSHA512(Vertx vertx)
vertx
- the vert.x instancestatic JDBCHashStrategy createPBKDF2(Vertx vertx)
vertx
- the vert.x instanceString generateSalt()
String computeHash(String password, String salt, int version)
password
- the unhashed passwordsalt
- the saltversion
- the nonce version to useString getHashedStoredPwd(JsonArray row)
row
- the rowString getSalt(JsonArray row)
row
- the rowvoid setNonces(JsonArray nonces)
nonces
- a json array.Copyright © 2021 Eclipse. All rights reserved.