Encodes bytes as a hex string.
encode(bytes, lowerCase?)
bytes
An array or a typed array of bytes.
lowerCase optional
If true, the hex string will be in lower case, otherwise in upper case.
A hex string.
hex.encode([255, 18, 27])
"FF121B"
hex.encode(new Uint8Array([255, 18, 27]), true)
"ff121b"