HTTPClient
Class MD5

java.lang.Object
  |
  +--HTTPClient.MD5

class MD5
extends java.lang.Object

Some utility methods for digesting info using MD5.

Since:
V0.3-3

Constructor Summary
(package private) MD5()
           
 
Method Summary
TypeMethod
static byte[] digest(byte[] input)
          Digest the input.
static byte[] digest(byte[] input1, byte[] input2)
          Digest the input.
static byte[] digest(java.lang.String input)
          Digest the input.
static java.lang.String hexDigest(byte[] input)
          Digest the input.
static java.lang.String hexDigest(byte[] input1, byte[] input2)
          Digest the input.
static java.lang.String hexDigest(java.lang.String input)
          Digest the input.
static java.lang.String toHex(byte[] hash)
          Turns array of bytes into string representing each byte as unsigned hex number.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MD5

MD5()
Method Detail

toHex

public static final java.lang.String toHex(byte[] hash)
Turns array of bytes into string representing each byte as unsigned hex number.
Parameters:
hash - array of bytes to convert to hex-string
Returns:
generated hex string

digest

public static final byte[] digest(byte[] input)
Digest the input.
Parameters:
input - the data to be digested.
Returns:
the md5-digested input

digest

public static final byte[] digest(byte[] input1,
                                  byte[] input2)
Digest the input.
Parameters:
input1 - the first part of the data to be digested.
input2 - the second part of the data to be digested.
Returns:
the md5-digested input

hexDigest

public static final java.lang.String hexDigest(byte[] input)
Digest the input.
Parameters:
input - the data to be digested.
Returns:
the md5-digested input as a hex string

hexDigest

public static final java.lang.String hexDigest(byte[] input1,
                                               byte[] input2)
Digest the input.
Parameters:
input1 - the first part of the data to be digested.
input2 - the second part of the data to be digested.
Returns:
the md5-digested input as a hex string

digest

public static final byte[] digest(java.lang.String input)
Digest the input.
Parameters:
input - the data to be digested.
Returns:
the md5-digested input as a hex string

hexDigest

public static final java.lang.String hexDigest(java.lang.String input)
Digest the input.
Parameters:
input - the data to be digested.
Returns:
the md5-digested input as a hex string