Package org.webpki.util
Class HexaDecimal
java.lang.Object
org.webpki.util.HexaDecimal
Encodes/decodes hexadecimal data.
-
Method Summary
-
Method Details
-
encodeDebugData
Encode byte array into readable lines.After each line (
nn: hh hh...
) the ASCII counterpart is listed as well.- Parameters:
byteArray
- The data to be listedbytesPerLine
- Bytes per line- Returns:
- Human-readable String
-
encode
Encode byte array.- Parameters:
byteArray
- Data to be encoded- Returns:
- String with zero or more hexadecimal pairs (
hh
)
-
decode
Decode hexadecimal string.- Parameters:
hexString
- String with zero or more hexadecimal pairs (hh
)- Returns:
- Decoded data as a byte array
- Throws:
IllegalArgumentException
-