Function liberate::string::hexencode(::liberate::types::byte *, size_t, ::liberate::types::byte const *, size_t, bool)

Function Documentation

size_t liberate::string::hexencode(::liberate::types::byte *output, size_t output_size, ::liberate::types::byte const *input, size_t input_size, bool uppercase = false)

Hex encode.

Parameters
  • output[out] The size of the output buffer to write to.

  • output_size[in] The size of the output buffer.

  • input[in] The input buffer to hex encode.

  • input_size[in] The size of the input buffer.

  • uppercase[in] optionally output uppercase hex codes; defaults to false.

Returns

the size of the output buffer used, or 0 if nothing could be transcoded (e.g. due to a too small output buffer).