| Modifier and Type | Field and Description | 
|---|---|
static io.vertx.lang.rx.TypeArg<JDBCHashStrategy> | 
__TYPE_ARG  | 
| Constructor and Description | 
|---|
JDBCHashStrategy(JDBCHashStrategy delegate)  | 
JDBCHashStrategy(Object delegate)  | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
computeHash(String password,
           String salt,
           int version)
Compute the hashed password given the unhashed password and the salt 
 | 
static JDBCHashStrategy | 
createPBKDF2(Vertx vertx)
Implements a Hashing Strategy as per https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet (2018-01-17). 
 | 
static JDBCHashStrategy | 
createSHA512(Vertx vertx)
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. 
 | 
boolean | 
equals(Object o)  | 
String | 
generateSalt()
Compute a random salt. 
 | 
JDBCHashStrategy | 
getDelegate()  | 
String | 
getHashedStoredPwd(JsonArray row)
Retrieve the hashed password from the result of the authentication query 
 | 
String | 
getSalt(JsonArray row)
Retrieve the salt from the result of the authentication query 
 | 
int | 
hashCode()  | 
static boolean | 
isEqual(String hasha,
       String hashb)
Time constant string comparision to avoid timming attacks. 
 | 
static JDBCHashStrategy | 
newInstance(JDBCHashStrategy arg)  | 
void | 
setNonces(JsonArray nonces)
Sets a ordered list of nonces where each position corresponds to a version. 
 | 
String | 
toString()  | 
public static final io.vertx.lang.rx.TypeArg<JDBCHashStrategy> __TYPE_ARG
public JDBCHashStrategy(JDBCHashStrategy delegate)
public JDBCHashStrategy(Object delegate)
public JDBCHashStrategy getDelegate()
public static JDBCHashStrategy createSHA512(Vertx vertx)
vertx - the vert.x instancepublic static JDBCHashStrategy createPBKDF2(Vertx vertx)
vertx - the vert.x instancepublic String generateSalt()
public String computeHash(String password, String salt, int version)
password - the unhashed passwordsalt - the saltversion - the nonce version to usepublic String getHashedStoredPwd(JsonArray row)
row - the rowpublic String getSalt(JsonArray row)
row - the rowpublic void setNonces(JsonArray nonces)
nonces - a json array.public static boolean isEqual(String hasha, String hashb)
hasha - hash a to comparehashb - hash b to comparepublic static JDBCHashStrategy newInstance(JDBCHashStrategy arg)
Copyright © 2020 Eclipse. All rights reserved.