public class OpenBSDBCrypt extends Object
| Constructor and Description |
|---|
OpenBSDBCrypt() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkPassword(String bcryptString,
char[] password)
Checks if a password corresponds to a 60 character Bcrypt String
|
static String |
generate(char[] password,
byte[] salt,
int cost)
Creates a 60 character Bcrypt String, including
version, cost factor, salt and hash, separated by '$'
|
public static String generate(char[] password, byte[] salt, int cost)
cost - the cost factor, treated as an exponent of 2salt - a 16 byte saltpassword - the passwordpublic static boolean checkPassword(String bcryptString, char[] password)
bcryptString - a 60 character Bcrypt String, including
version, cost factor, salt and hash,
separated by '$'password - the password as an array of charsCopyright © 2015–2017 The veraPDF Consortium. All rights reserved.