Capy-Bearer Documentation

hex

lib call

Capy

function hex(value : string) string

Description

hex() converts each input byte to two lowercase hexadecimal characters.

Use it to make digest bytes printable. For example, hex(sha256(value)) returns a SHA-256 digest as lowercase hexadecimal text.

Parameters

value : bytes to encode

Return Values

Lowercase hexadecimal text.

Example

Capy

print(hex(sha256("abc")), "\n")

Output

ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad