Capy-Bearer Documentation

hex

host 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")