com.funambol.util
Class MD5

java.lang.Object
  extended by com.funambol.util.MD5

public class MD5
extends java.lang.Object

This class provides utitlities to compute MD5 for array of bytes. The implementation is directly taken from the "The Legion Of The Bouncy Castle (http://www.bouncycastle.org).


Constructor Summary
MD5()
          Standard constructor
 
Method Summary
 byte[] calculateMD5(byte[] input)
          Compute md5 of given byte array.
 byte[] computeMD5Credentials(java.lang.String username, java.lang.String password, byte[] nonce)
          Compute md5 credentials for the given username and password.
protected  void processBlock()
           
protected  void processLength(long bitLength)
           
protected  void processWord(byte[] in, int inOff)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MD5

public MD5()
Standard constructor

Method Detail

calculateMD5

public byte[] calculateMD5(byte[] input)
Compute md5 of given byte array.

Parameters:
input - the byte array to be hashed
Returns:
the md5 checksum of input

computeMD5Credentials

public final byte[] computeMD5Credentials(java.lang.String username,
                                          java.lang.String password,
                                          byte[] nonce)
Compute md5 credentials for the given username and password. The nonce is expected to be plain text and not B64 encoded.

Parameters:
username - the username
password - the password
nonce - the text plain nonce
Returns:
the md5 authentication token

processWord

protected void processWord(byte[] in,
                           int inOff)

processLength

protected void processLength(long bitLength)

processBlock

protected void processBlock()


Copyright © 2001-2009 Funambol.