cardano::BASE16 class

A static class to encode and decode bytes to and from hex strings.

Public static functions

static auto decode(std::string_view str) →  std::vector<uint8_t>
Decode a hex string to a byte array.
static auto encode(std::span<const uint8_t> bytes) →  std::string
Encode a byte array to a hex string.

Function documentation

static std::vector<uint8_t> cardano::BASE16::decode(std::string_view str)

Decode a hex string to a byte array.

Parameters
str The hex string to decode.
Returns The decoded byte array.

static std::string cardano::BASE16::encode(std::span<const uint8_t> bytes)

Encode a byte array to a hex string.

Parameters
bytes The byte array to encode.
Returns The encoded hex string.