Method Summary |
|
public byte[] | getHash() Gets this hash sum as an array of 16 bytes. |
public static byte[] | getHash(byte[] b) Gets the MD5 hash of the given byte array.
Parameters: b - byte array for which an MD5 hash is desired. |
public static byte[] | getHash(InputStream in) Gets the MD5 hash the data on the given InputStream.
Parameters: in - byte array for which an MD5 hash is desired. |
public static byte[] | getHash(File f) Gets the MD5 hash of the given file.
Parameters: f - file for which an MD5 hash is desired. |
public static byte[] | getHash(String s) Gets the MD5 hash of the given String.
The string is converted to bytes using the current
platform's default character encoding.
Parameters: s - String for which an MD5 hash is desired. |
public static byte[] | getHash(String s, String enc) Gets the MD5 hash of the given String.
Parameters: s - String for which an MD5 hash is desired. Parameters: enc - The name of a supported character encoding. |
public String | getHashString() Returns 32-character hex representation of this hash. |
public static String | getHashString(byte[] b) Gets the MD5 hash of the given byte array.
Parameters: b - byte array for which an MD5 hash is desired. |
public static String | getHashString(InputStream in) Gets the MD5 hash the data on the given InputStream.
Parameters: in - byte array for which an MD5 hash is desired. |
public static String | getHashString(File f) Gets the MD5 hash of the given file.
Parameters: f - file array for which an MD5 hash is desired. |
public static String | getHashString(String s) Gets the MD5 hash of the given String.
The string is converted to bytes using the current
platform's default character encoding.
Parameters: s - String for which an MD5 hash is desired. |
public static String | getHashString(String s, String enc) Gets the MD5 hash of the given String.
Parameters: s - String for which an MD5 hash is desired. Parameters: enc - The name of a supported character encoding. |
public static void | main(String[] args) Command line program that will take files as arguments
and output the MD5 sum for each file. |
public void | reset() Reset the MD5 sum to its initial state. |
public String | toString() Returns 32-character hex representation of this hash. |
public void | update(byte buffer, int offset, int length) Update this hash with the given data. |
public void | update(byte buffer, int length) Update this hash with the given data. |
public void | update(byte buffer) Update this hash with the given data. |
public void | update(byte b) Updates this hash with a single byte. |
public void | update(String s) Update this hash with a String. |
public void | update(String s, String enc) Update this hash with a String. |