public class DigestUtils
extends java.lang.Object
| Constructor and Description |
|---|
DigestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.StringBuilder |
appendMd5DigestAsHex(byte[] bytes,
java.lang.StringBuilder builder)
Append a hexadecimal string representation of the MD5 digest of the given bytes to the given
StringBuilder. |
static java.lang.StringBuilder |
appendMd5DigestAsHex(java.io.InputStream inputStream,
java.lang.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(java.io.InputStream inputStream)
Calculate the MD5 digest of the given stream.
|
static byte[] |
md5Digest(java.lang.String string)
Calculate the MD5 digest of string.
|
static java.lang.String |
md5DigestAsHex(byte[] bytes)
Return a hexadecimal string representation of the MD5 digest of the given bytes.
|
static java.lang.String |
md5DigestAsHex(java.io.InputStream inputStream)
Return a hexadecimal string representation of the MD5 digest of the given stream.
|
static java.lang.String |
md5DigestAsHex(java.lang.String string)
Return a hexadecimal string representation of the MD5 digest of string.
|
public static byte[] md5Digest(java.lang.String string)
string - string to calculate the digest over.public static byte[] md5Digest(byte[] bytes)
bytes - the bytes to calculate the digest over.public static byte[] md5Digest(java.io.InputStream inputStream)
throws java.io.IOException
inputStream - the InputStream to calculate the digest over.java.io.IOExceptionpublic static java.lang.String md5DigestAsHex(java.lang.String string)
string - string to calculate the digest over.public static java.lang.String md5DigestAsHex(byte[] bytes)
bytes - the bytes to calculate the digest over.public static java.lang.String md5DigestAsHex(java.io.InputStream inputStream)
throws java.io.IOException
inputStream - the InputStream to calculate the digest over.java.io.IOExceptionpublic static java.lang.StringBuilder appendMd5DigestAsHex(byte[] bytes,
java.lang.StringBuilder builder)
StringBuilder.bytes - the bytes to calculate the digest over.builder - the string builder to append the digest to.public static java.lang.StringBuilder appendMd5DigestAsHex(java.io.InputStream inputStream,
java.lang.StringBuilder builder)
throws java.io.IOException
StringBuilder.inputStream - the inputStream to calculate the digest over.builder - the string builder to append the digest to.java.io.IOException