|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.security.MD5PasswordHasher
public class MD5PasswordHasher
Implementation of a PasswordHasher using MD5 encryption algorithm with a randomized initial state. When serialized, the initial state of the hash function is encoded as part of this object's wire representation.
This is intended to be useful for applications where a one-time hash is desired, e.g. when performing a client/server log-in.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
Constructor Summary | |
---|---|
MD5PasswordHasher()
Construct a new MD5PasswordHasher with a randomized initial state. |
|
MD5PasswordHasher(java.lang.Long pInitialHashState)
Construct a new MD5PasswordHasher with the given initial state. |
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. |
java.lang.String |
encryptPassword(java.lang.String pPassword)
Hashes a password suitably for long-term storage. |
PasswordHasher |
getLoginPasswordHasher()
Returns a password hasher instance useful for performing a login. |
java.lang.Object |
getPasswordHashKey()
Returns the hash key that was used for hashing the password for login. |
java.lang.String |
hashPasswordForLogin(java.lang.String pPassword)
Performs the appropriate hashing function for a login process. |
static void |
main(java.lang.String[] args)
Simple command-line interface for deriving MD5 hashed passwords. |
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 MD5PasswordHasher()
public MD5PasswordHasher(java.lang.Long pInitialHashState)
Method Detail |
---|
public java.lang.String encryptPassword(java.lang.String pPassword)
encryptPassword
in interface PasswordHasher
public boolean checkPassword(java.lang.String pLoginPassword, java.lang.String pEncryptedPassword, java.lang.Object pHashKey)
checkPassword
in interface PasswordHasher
public java.lang.String hashPasswordForLogin(java.lang.String pPassword)
hashPasswordForLogin
in interface PasswordHasher
public java.lang.Object getPasswordHashKey()
getPasswordHashKey
in interface PasswordHasher
public PasswordHasher getLoginPasswordHasher()
getLoginPasswordHasher
in interface PasswordHasher
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |