Constructor and Description |
---|
UnixCrypt() |
Modifier and Type | Method and Description |
---|---|
static String |
crypt(String original)
Encrypt a password given the cleartext password.
|
static String |
crypt(String salt,
String original)
Encrypt a password given the cleartext password and a "salt".
|
static boolean |
matches(String encryptedPassword,
String enteredPassword)
Check that enteredPassword encrypts to * encryptedPassword.
|
public UnixCrypt()
public static final String crypt(String salt, String original)
salt
- A two-character string representing the salt used to
iterate the encryption engine in lots of different ways. If you
are generating a new encryption then this value should be
randomised.original
- The password to be encrypted.public static final String crypt(String original)
original
- The password to be encrypted.public static final boolean matches(String encryptedPassword, String enteredPassword)
encryptedPassword
- The encryptedPassword. The first
two characters are assumed to be the salt. This string would
be the same as one found in a Unix /etc/passwd file.enteredPassword
- The password as entered by the user (or
otherwise aquired).Copyright © 2015 Lucee