org.pfsw.tools.beluga.ldap.directory
Class HashedPassword

java.lang.Object
  extended by org.pfsw.tools.beluga.ldap.directory.HashedPassword

public class HashedPassword
extends Object

Container for a SHA hashed password including salt if it is SSHA.

Version:
1.0
Author:
Manfred Duchrow

Constructor Summary
HashedPassword(String password)
          Initialize the new instance with a hashed password.
 
Method Summary
 boolean isEqual(byte[] password)
          Compares the given clear text password with the hashed password.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashedPassword

public HashedPassword(String password)
Initialize the new instance with a hashed password.

Parameters:
password - A base64 encoded hash of a password with a prefix {SHA} or {SSHA}
Method Detail

isEqual

public boolean isEqual(byte[] password)
Compares the given clear text password with the hashed password. Returns true if the hash of the given password equals the password hash in this object.



Copyright © 2012 Manfred Duchrow Consulting & Software. All Rights Reserved.