bin.toHex()
bin.toHex(data) → string
Converts binary data to a printable hex string.
The inverse is bin.fromHex().
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| data | buffer | string | yes | — | Binary data, e.g. a sha256() digest or packed array. |
Returns
string
Hexadecimal representation.
Example
let aesKey = sha256("flexscadaFlexsQ5!");
print("KEY: ", bin.toHex(aesKey));