Package com.mongodb.internal
Class HexUtils
- java.lang.Object
-
- com.mongodb.internal.HexUtils
-
public final class HexUtils extends java.lang.Object
This class is not part of the public API and may be removed or changed at any time.
-
-
Constructor Summary
Constructors Constructor Description HexUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
hexMD5(byte[] data)
Produce hex representation of the MD5 digest of a byte array.static java.lang.String
hexMD5(java.nio.ByteBuffer buf, int offset, int len)
Produce hex representation of the MD5 digest of a byte array.static java.lang.String
toHex(byte[] bytes)
Converts the given byte buffer to a hexadecimal string usingInteger.toHexString(int)
.
-
-
-
Method Detail
-
toHex
public static java.lang.String toHex(byte[] bytes)
Converts the given byte buffer to a hexadecimal string usingInteger.toHexString(int)
.- Parameters:
bytes
- the bytes to convert to hex- Returns:
- a String containing the hex representation of the given bytes.
-
hexMD5
public static java.lang.String hexMD5(byte[] data)
Produce hex representation of the MD5 digest of a byte array.- Parameters:
data
- bytes to digest- Returns:
- hex string of the MD5 digest
-
hexMD5
public static java.lang.String hexMD5(java.nio.ByteBuffer buf, int offset, int len)
Produce hex representation of the MD5 digest of a byte array.- Parameters:
buf
- byte buffer containing the bytes to digestoffset
- the position to start reading bytes fromlen
- the number of bytes to read from the buffer- Returns:
- hex string of the MD5 digest
-
-