org.promotego.logic
Class PlainTextHash

java.lang.Object
  extended by org.promotego.logic.PlainTextHash
All Implemented Interfaces:
PasswordHashTool

public class PlainTextHash
extends java.lang.Object
implements PasswordHashTool


Constructor Summary
PlainTextHash()
           
 
Method Summary
 java.lang.String hash(java.lang.String password)
          Hashes the password provided.
 boolean match(java.lang.String cryptedPassword, java.lang.String password)
          Compares the hashed password with the plain text password provided.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainTextHash

public PlainTextHash()
Method Detail

match

public boolean match(java.lang.String cryptedPassword,
                     java.lang.String password)
Description copied from interface: PasswordHashTool
Compares the hashed password with the plain text password provided.

Specified by:
match in interface PasswordHashTool
Parameters:
cryptedPassword - A password hashed using this mechanism.
password - A plaintext password to compare to the hashedPassword.
Returns:
True if the password matches the hashed password.

hash

public java.lang.String hash(java.lang.String password)
Description copied from interface: PasswordHashTool
Hashes the password provided.

Specified by:
hash in interface PasswordHashTool
Parameters:
password - The plaintext password to be hashed.


Copyright © 2007. All Rights Reserved.