atg.security
Class PasswordHasher2Adapter

java.lang.Object
  extended by atg.security.PasswordHasher2Adapter
All Implemented Interfaces:
PasswordHasher, PasswordHasher2, java.io.Serializable
Direct Known Subclasses:
SaltedDigestPasswordHasher, SaltedMD5PasswordHasher

public abstract class PasswordHasher2Adapter
extends java.lang.Object
implements PasswordHasher2

An adapter that implements the base PasswordHasher interface for PasswordHasher2 implementations. This passes a dummy login ID to the PasswordHasher2 interfaces, allowing the PasswordHasher2 to work in an old PasswordHasher environment. Note, however, that mixing the use of the PasswordHasher and PasswordHasher2 interfaces will fail (ie client and server must use the same interface).

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
PasswordHasher2Adapter()
           
 
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)
          Encrypts a password suitably for long-term storage.
 java.lang.String hashPasswordForLogin(java.lang.String pPassword)
          Performs the appropriate hashing function for a login process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface atg.security.PasswordHasher2
checkPassword, encryptPassword, getLoginPasswordHasher, getPasswordHashKey, hashPasswordForLogin
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

PasswordHasher2Adapter

public PasswordHasher2Adapter()
Method Detail

encryptPassword

public java.lang.String encryptPassword(java.lang.String pPassword)
Encrypts a password suitably for long-term storage.

Specified by:
encryptPassword in interface PasswordHasher

checkPassword

public boolean checkPassword(java.lang.String pLoginPassword,
                             java.lang.String pEncryptedPassword,
                             java.lang.Object pHashKey)
Returns true if the login password matches the encrypted password.

Specified by:
checkPassword in interface PasswordHasher

hashPasswordForLogin

public java.lang.String hashPasswordForLogin(java.lang.String pPassword)
Performs the appropriate hashing function for a login process. This value will later be passed to checkPassword().

Specified by:
hashPasswordForLogin in interface PasswordHasher