hex.encode

Encodes bytes as a hex string.

Syntax

encode(bytes, lowerCase?)

Parameters

Return value

A hex string.

Example

hex.encode([255, 18, 27])
"FF121B"
hex.encode(new Uint8Array([255, 18, 27]), true)
"ff121b"