public class Util extends Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static String |
hexMD5(byte[] data)
Produce hex representation of the MD5 digest of a byte array.
|
static String |
hexMD5(ByteBuffer buf,
int offset,
int len)
Produce hex representation of the MD5 digest of a byte array.
|
static String |
toHex(byte[] bytes)
Converts the given byte buffer to a hexadecimal string using
Integer.toHexString(int) . |
public static String toHex(byte[] bytes)
Integer.toHexString(int)
.bytes
- the bytes to convert to hexpublic static String hexMD5(byte[] data)
data
- bytes to digestpublic static String hexMD5(ByteBuffer buf, int offset, int len)
buf
- byte buffer containing the bytes to digestoffset
- the position to start reading bytes fromlen
- the number of bytes to read from the buffer