Convert between Bytes and hexadecimal strings.
fromBytes encodes Bytes into a lowercase hex String.toBytes decodes a hex String (mixed-case) into Bytes, with validation.toBytesUnchecked decodes a lowercase hex String into Bytes, without validation.Parse a hex string into Bytes. Returns Nothing if the string has
odd length or contains non-hex characters. Accepts both uppercase and
lowercase hex digits.
toBytes "ff"
--> Just <1 byte>
toBytes "zz"
--> NothingParse a lowercase hex string into Bytes. Does not validate the input:
assumes even length and only lowercase hex characters (0-9, a-f).
About 20% faster than toBytes.
toBytesUnchecked "ff"
--> <1 byte>
Convert
Bytesto a lowercase hex string.