|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.security.iPlanetSSHAPasswordHasher
public class iPlanetSSHAPasswordHasher
A password hasher which implements the SSHA (salted SHA) algorithm as implemented by the iPlanet Directory Server.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
iPlanetSSHAPasswordHasher()
|
Method Summary | |
---|---|
boolean |
checkPassword(java.lang.String pLoginPassword,
java.lang.String pEncryptedPassword,
java.lang.Object pHashKey)
Returns true if the login password matches the encrypted password. |
boolean |
checkPassword(java.lang.String pLogin,
java.lang.String pLoginPassword,
java.lang.String pEncryptedPassword,
java.lang.Object pHashKey)
Returns true if the login password matches the encrypted password. |
java.lang.String |
encryptPassword(java.lang.String pPassword)
Encrypts a password suitably for long-term storage. |
java.lang.String |
encryptPassword(java.lang.String pLogin,
java.lang.String pPassword)
Encrypts a password suitably for long-term storage. |
protected static byte[] |
extractSalt(java.lang.String pEncryptedPassword)
Given a password encrypted with encryptPassword ,
extracts the salt which was used to encrypt it. |
protected java.lang.String |
getEncryptedPassword(java.lang.String pLogin)
Returns the encrypted password associated with the given login name. |
PasswordHasher |
getLoginPasswordHasher()
Returns a password hasher instance useful for performing a login. |
java.lang.Object |
getPasswordHashKey()
Returns the hash key (if any) that was used for hashing the password for login. |
protected byte[] |
getSalt(java.lang.String pLogin)
Given a login name, extracts the salt which should be used to encrypt the associated password. |
java.lang.String |
hashPasswordForLogin(java.lang.String pPassword)
Performs the appropriate hashing function for a login process. |
java.lang.String |
hashPasswordForLogin(java.lang.String pLogin,
java.lang.String pPassword)
Performs the appropriate hashing function for a login process. |
static void |
main(java.lang.String[] pArgs)
Main test routine. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public iPlanetSSHAPasswordHasher()
Method Detail |
---|
protected java.lang.String getEncryptedPassword(java.lang.String pLogin)
protected byte[] getSalt(java.lang.String pLogin)
protected static byte[] extractSalt(java.lang.String pEncryptedPassword)
encryptPassword
,
extracts the salt which was used to encrypt it.
public java.lang.String encryptPassword(java.lang.String pPassword)
encryptPassword
in interface PasswordHasher
public java.lang.String encryptPassword(java.lang.String pLogin, java.lang.String pPassword)
encryptPassword
in interface PasswordHasher2
pLogin
- The login that the password is associated with.pPassword
- The plain-text password to encrypt.public boolean checkPassword(java.lang.String pLoginPassword, java.lang.String pEncryptedPassword, java.lang.Object pHashKey)
checkPassword
in interface PasswordHasher
public boolean checkPassword(java.lang.String pLogin, java.lang.String pLoginPassword, java.lang.String pEncryptedPassword, java.lang.Object pHashKey)
checkPassword
in interface PasswordHasher2
pLogin
- The login that the password is associated with.pLoginPassword
- The password that has previously been
hashed by hashPasswordForLogin()
.pEncryptedPassword
- The password as it was returned by
encryptPassword()
.pHashKey
- A hash key that was used to hash the password for
login, and which may be needed to compare the encrypted password
to the hashed password. This is typically some sort of hash
initializer that is unique to the PasswordHasher instance.public java.lang.String hashPasswordForLogin(java.lang.String pPassword)
hashPasswordForLogin
in interface PasswordHasher
public java.lang.String hashPasswordForLogin(java.lang.String pLogin, java.lang.String pPassword)
hashPasswordForLogin
in interface PasswordHasher2
pLogin
- The login that the password is associated with.pPassword
- The plain-text password that is to be hashed
prior to supply to checkPassword.public java.lang.Object getPasswordHashKey()
getPasswordHashKey
in interface PasswordHasher
getPasswordHashKey
in interface PasswordHasher2
public PasswordHasher getLoginPasswordHasher()
getLoginPasswordHasher
in interface PasswordHasher
getLoginPasswordHasher
in interface PasswordHasher2
public static final void main(java.lang.String[] pArgs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |