picture.io
Class MD5
java.lang.Object
|
+--picture.io.MD5
- public final class MD5
- extends java.lang.Object
Simple MD5 message digest class, doesn't use or provide security
providers and other nice stuff in order to use it fast and easy
;-).
Java implementation of the RSA Data Security, Inc. MD5, derived
from the RSA Data Security, Inc. MD5 Message-Digest Algorithm. See
RFC 1321 for details.
Method Summary |
static java.lang.String |
md5(byte[] data)
Returns the result of the MD5 hash function of the input data
as hex string. |
static java.lang.String |
md5(java.lang.String data)
Returns the result of the MD5 hash function of the input data
as hex string. |
static byte[] |
md5raw(byte[] data)
Returns the raw bits of the MD5 hash function of the input
data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
md5raw
public static final byte[] md5raw(byte[] data)
- Returns the raw bits of the MD5 hash function of the input
data.
- Parameters:
data
- Data- Returns:
- md5 checksum as raw byte array
- See Also:
md5(byte[] data)
md5
public static final java.lang.String md5(byte[] data)
- Returns the result of the MD5 hash function of the input data
as hex string.
- Parameters:
data
- Data- Returns:
- md5 checksum as 32 characters long hex string
- See Also:
md5raw(byte[] data)
md5
public static final java.lang.String md5(java.lang.String data)
- Returns the result of the MD5 hash function of the input data
as hex string. The data string will be converted to a byte
array, so beware of character encodings!
- Parameters:
data
- Data as string- Returns:
- md5 checksum as 32 characters long hex string
- See Also:
md5raw(byte[] data)