Mainly for internal use within the framework; consider Apache Commons Codec for a more comprehensive suite of digest utilities.
| Modifier and Type | Field and Description |
|---|---|
| private static final char[] | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static StringBuilder | |
| private static StringBuilder | |
| public static StringBuilder | Returns: the given string builderthe bytes to calculate the digest over bytes, StringBuilder the string builder to append the digest to builder)Append a hexadecimal string representation of the MD5 digest of the given
bytes to the given |
| public static StringBuilder | Returns: the given string builderthe inputStream to calculate the digest over inputStream, StringBuilder the string builder to append the digest to builder)Append a hexadecimal string representation of the MD5 digest of the given
inputStream to the given |
| private static byte[] | |
| private static byte[] | |
| private static char[] | |
| private static char[] | |
| private static String | |
| private static String | |
| private static char[] | |
| private static MessageDigest | |
| public static byte[] | Returns: the digestthe bytes to calculate the digest over bytes)Calculate the MD5 digest of the given bytes. |
| public static byte[] | Returns: the digestthe InputStream to calculate the digest over inputStream)Calculate the MD5 digest of the given stream. |
| public static String | Returns: a hexadecimal digest stringthe bytes to calculate the digest over bytes)Return a hexadecimal string representation of the MD5 digest of the given bytes. |
| public static String | Returns: a hexadecimal digest stringthe InputStream to calculate the digest over inputStream)Return a hexadecimal string representation of the MD5 digest of the given stream. |
| HEX_CHARS | back to summary |
|---|---|
| private static final char[] HEX_CHARS | |
| MD5_ALGORITHM_NAME | back to summary |
|---|---|
| private static final String MD5_ALGORITHM_NAME | |
| DigestUtils | back to summary |
|---|---|
| public DigestUtils() | |
| appendDigestAsHex | back to summary |
|---|---|
| private static StringBuilder appendDigestAsHex(String algorithm, byte[] bytes, StringBuilder builder) | |
| appendDigestAsHex | back to summary |
|---|---|
| private static StringBuilder appendDigestAsHex(String algorithm, InputStream inputStream, StringBuilder builder) throws IOException | |
| appendMd5DigestAsHex | back to summary |
|---|---|
| public static StringBuilder appendMd5DigestAsHex(byte[] bytes, StringBuilder builder) Append a hexadecimal string representation of the MD5 digest of the given
bytes to the given
| |
| appendMd5DigestAsHex | back to summary |
|---|---|
| public static StringBuilder appendMd5DigestAsHex(InputStream inputStream, StringBuilder builder) throws IOException Append a hexadecimal string representation of the MD5 digest of the given
inputStream to the given This method does not close the input stream.
| |
| digest | back to summary |
|---|---|
| private static byte[] digest(String algorithm, byte[] bytes) | |
| digest | back to summary |
|---|---|
| private static byte[] digest(String algorithm, InputStream inputStream) throws IOException | |
| digestAsHexChars | back to summary |
|---|---|
| private static char[] digestAsHexChars(String algorithm, byte[] bytes) | |
| digestAsHexChars | back to summary |
|---|---|
| private static char[] digestAsHexChars(String algorithm, InputStream inputStream) throws IOException | |
| digestAsHexString | back to summary |
|---|---|
| private static String digestAsHexString(String algorithm, byte[] bytes) | |
| digestAsHexString | back to summary |
|---|---|
| private static String digestAsHexString(String algorithm, InputStream inputStream) throws IOException | |
| encodeHex | back to summary |
|---|---|
| private static char[] encodeHex(byte[] bytes) | |
| getDigest | back to summary |
|---|---|
| private static MessageDigest getDigest(String algorithm) Create a new Necessary because | |
| md5Digest | back to summary |
|---|---|
| public static byte[] md5Digest(byte[] bytes) Calculate the MD5 digest of the given bytes.
| |
| md5Digest | back to summary |
|---|---|
| public static byte[] md5Digest(InputStream inputStream) throws IOException Calculate the MD5 digest of the given stream. This method does not close the input stream.
| |
| md5DigestAsHex | back to summary |
|---|---|
| public static String md5DigestAsHex(byte[] bytes) Return a hexadecimal string representation of the MD5 digest of the given bytes.
| |
| md5DigestAsHex | back to summary |
|---|---|
| public static String md5DigestAsHex(InputStream inputStream) throws IOException Return a hexadecimal string representation of the MD5 digest of the given stream. This method does not close the input stream.
| |