hexToByteArray
Parses a byte array from this string using the specified format.
The string must conform to the structure defined by the format. Note that only the HexFormat.bytes property of the format instance affects the parsing of a byte array.
Parsing is performed in a case-insensitive manner for both the hexadecimal digits and the elements (prefix, suffix, separators) defined in the HexFormat.bytes property. Additionally, any of the char sequences CRLF, LF and CR is considered a valid line separator.
Refer to HexFormat.BytesHexFormat for details about the available format options and their impact on parsing.
Since Kotlin
1.9Return
the byte array parsed from this string.
Parameters
the HexFormat to use for parsing, HexFormat.Default by default.
Throws
if this string does not conform to the specified format.