public abstract class DigestUtils extends Object
Mainly for internal use within the framework; consider Apache Commons Codec for a more comprehensive suite of digest utilities.
| Constructor and Description | 
|---|
DigestUtils()  | 
| Modifier and Type | Method and Description | 
|---|---|
static StringBuilder | 
appendMd5DigestAsHex(byte[] bytes,
                    StringBuilder builder)
Append a hexadecimal string representation of the MD5 digest of the given
 bytes to the given  
StringBuilder. | 
static StringBuilder | 
appendMd5DigestAsHex(InputStream inputStream,
                    StringBuilder builder)
Append a hexadecimal string representation of the MD5 digest of the given
 inputStream to the given  
StringBuilder. | 
static byte[] | 
md5Digest(byte[] bytes)
Calculate the MD5 digest of the given bytes. 
 | 
static byte[] | 
md5Digest(InputStream inputStream)
Calculate the MD5 digest of the given stream. 
 | 
static String | 
md5DigestAsHex(byte[] bytes)
Return a hexadecimal string representation of the MD5 digest of the given bytes. 
 | 
static String | 
md5DigestAsHex(InputStream inputStream)
Return a hexadecimal string representation of the MD5 digest of the given stream. 
 | 
public static byte[] md5Digest(byte[] bytes)
bytes - the bytes to calculate the digest overpublic static byte[] md5Digest(InputStream inputStream) throws IOException
inputStream - the InputStream to calculate the digest overIOExceptionpublic static String md5DigestAsHex(byte[] bytes)
bytes - the bytes to calculate the digest overpublic static String md5DigestAsHex(InputStream inputStream) throws IOException
inputStream - the InputStream to calculate the digest overIOExceptionpublic static StringBuilder appendMd5DigestAsHex(byte[] bytes, StringBuilder builder)
StringBuilder.bytes - the bytes to calculate the digest overbuilder - the string builder to append the digest topublic static StringBuilder appendMd5DigestAsHex(InputStream inputStream, StringBuilder builder) throws IOException
StringBuilder.inputStream - the inputStream to calculate the digest overbuilder - the string builder to append the digest toIOException