Package com.netscape.cms.authentication
Class Crypt
java.lang.Object
com.netscape.cms.authentication.Crypt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieve the resulting encrypted string from the current passwd and salt settings.Retrieve the passwd string currently being encrypted.getSalt()
Retrieve the salt string currently being used for encryption.void
Set a new passwd string for encryption.void
Set a new salt string for encryption.
-
Constructor Details
-
Crypt
public Crypt()Create Crypt object with no passwd or salt set. Must use setPasswd() and setSalt() before getEncryptedPasswd(). -
Crypt
Create a Crypt object with specified salt. Use setPasswd() before getEncryptedPasswd().- Parameters:
salt
- the salt string for encryption
-
Crypt
Create a Crypt object with specified passwd and salt (often the already encypted passwd). Get the encrypted result with getEncryptedPasswd().- Parameters:
passwd
- the passwd to encryptsalt
- the salt string for encryption
-
-
Method Details
-
getPasswd
Retrieve the passwd string currently being encrypted.- Returns:
- the current passwd string
-
getSalt
Retrieve the salt string currently being used for encryption.- Returns:
- the current salt string
-
getEncryptedPasswd
Retrieve the resulting encrypted string from the current passwd and salt settings.- Returns:
- the encrypted passwd
-
setPasswd
Set a new passwd string for encryption. Use getEncryptedPasswd() to retrieve the new result.- Parameters:
passwd
- the new passwd string
-
setSalt
Set a new salt string for encryption. Use getEncryptedPasswd() to retrieve the new result.- Parameters:
salt
- the new salt string
-