public final class PasswordUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
createSalt()
Create a new salt using Java's SecureRandom for good entropy.
|
static String |
hash(String password,
String salt)
Hash a password.
|
static Boolean |
isValid(String password,
String salt,
String hashed)
Test whether a password/salt combination match a hash.
|
public static String createSalt()
public static String hash(String password, String salt)
password - The password.salt - The salt.Copyright © 2018 krotscheck.net. All rights reserved.