Class Hex
java.lang.Object
com.codename1.crypto.encoding.Hex
Hexadecimal encoding and decoding. Output is always lowercase; input may be
upper or lower case and may start with a
0x or 0X prefix.-
Method Summary
-
Method Details
-
encode
Encodes bytes as a lowercase hex string without a prefix.
Parameters
data: the bytes to encode
Returns
two hex digits per byte
-
decode
Decodes a hex string, accepting an optional
0x/0Xprefix and either case.Parameters
hex: the text to decode
Returns
the decoded bytes
Throws
IllegalArgumentException: if the length is odd or a character is not a hex digit
-