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.
DigestUtils
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 byte[] |
md5Digest(byte[] bytes)
Calculate the MD5 digest of the given bytes.
|
static String |
md5DigestAsHex(byte[] bytes)
Return a hexadecimal string representation of the MD5 digest of the given
bytes.
|
public static byte[] md5Digest(byte[] bytes)
bytes
- the bytes to calculate the digest overpublic static String md5DigestAsHex(byte[] bytes)
bytes
- the bytes to calculate the digest overpublic static StringBuilder appendMd5DigestAsHex(byte[] bytes, StringBuilder builder)
StringBuilder
.bytes
- the bytes to calculate the digest overbuilder
- the string builder to append the digest to