java.lang.Object
org.eclipse.jgit.util.Hex
Encodes and decodes to and from hexadecimal notation.
- Since:
- 5.7
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
Decode a hexadecimal string to a byte array.static String
toHexString
(byte[] b) Encode a byte array to a hexadecimal string.
-
Method Details
-
decode
Decode a hexadecimal string to a byte array. Note this method validates that characters in the given string are valid as digits in a hex string.- Parameters:
s
- hexadecimal string- Returns:
- decoded array
-
toHexString
Encode a byte array to a hexadecimal string.- Parameters:
b
- byte array- Returns:
- hexadecimal string
-