org.beepcore.beep.profile.sasl.otp.algorithm.md5
Class MD5

java.lang.Object
  |
  +--org.beepcore.beep.profile.sasl.otp.algorithm.AlgorithmImpl
        |
        +--org.beepcore.beep.profile.sasl.otp.algorithm.md5.MD5
All Implemented Interfaces:
Algorithm

public class MD5
extends AlgorithmImpl


Field Summary
static java.lang.String MD5_NAME
           
 
Fields inherited from interface org.beepcore.beep.profile.sasl.otp.algorithm.Algorithm
ERR_HASH_FAILURE
 
Constructor Summary
MD5()
           
 
Method Summary
protected  byte[] foldHash(byte[] hash)
          Method foldHash is provided for implementations, as the value of the message digest hash must be folding into 64 bits before it can be used by the SASLOTPProfile and its supporting classes.
 byte[] generateHash(byte[] hash)
          Method generateHash generate a hash value using the appropriate hash function.
static java.lang.String getAlgorithmName()
           
 java.lang.String getName()
          Method getName
 
Methods inherited from class org.beepcore.beep.profile.sasl.otp.algorithm.AlgorithmImpl
generateHash
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MD5_NAME

public static final java.lang.String MD5_NAME
See Also:
Constant Field Values
Constructor Detail

MD5

public MD5()
Method Detail

getName

public java.lang.String getName()
Description copied from class: AlgorithmImpl
Method getName

Specified by:
getName in interface Algorithm
Specified by:
getName in class AlgorithmImpl

getAlgorithmName

public static java.lang.String getAlgorithmName()

generateHash

public byte[] generateHash(byte[] hash)
                    throws InvalidParameterException
Description copied from class: AlgorithmImpl
Method generateHash generate a hash value using the appropriate hash function.

Specified by:
generateHash in interface Algorithm
Overrides:
generateHash in class AlgorithmImpl
Returns:
byte[] the hash value in binary form.
InvalidParameterException

foldHash

protected byte[] foldHash(byte[] hash)
                   throws InvalidParameterException
Description copied from class: AlgorithmImpl
Method foldHash is provided for implementations, as the value of the message digest hash must be folding into 64 bits before it can be used by the SASLOTPProfile and its supporting classes.

Specified by:
foldHash in class AlgorithmImpl
Returns:
byte[] is the folded hash.
Throws:
InvalidParameterException - of the has provided is somehow improper or invalid.


Copyright ? 2001 Invisible Worlds, Inc. All Rights Reserved.