public class BCrypt extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_COST |
| Constructor and Description |
|---|
BCrypt() |
| Modifier and Type | Method and Description |
|---|---|
static String |
hash(char[] password,
int cost) |
static boolean |
verify(String hash,
char[] password)
Check that a plaintext password matches a previously hashed one
|
public static final int DEFAULT_COST
public static String hash(char[] password, int cost)
password - the plaintext passwordcost - the computation cost (complexity increases at 2**cost)public static boolean verify(String hash, char[] password)
password - the plaintext password to verifyhash - the previously-hashed password (a 60-character BCrypt hash string)Copyright © 2017. All rights reserved.