# Hex.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/encoding/Hex.hpp"

# Hex

Utility class for hex string encoding/decoding .

namespace oatpp { namespace encoding { 
  class Hex {}
}}

# Fields

Type Name Summary
v_int32 ERROR_UNKNOWN_SYMBOL Unknown symbol error.

# Methods

Return Type Name Summary
void writeUInt16 Write value as hex string to buffer.
void writeUInt32 Write value as hex string to buffer.
v_int32 readUInt16 Parse 4-char hex string to int16.
v_int32 readUInt32 Parse 8-char hex string to int32.

# Hex::ERROR_UNKNOWN_SYMBOL

Unknown symbol error.

static constexpr v_int32 ERROR_UNKNOWN_SYMBOL = 1

# Hex::writeUInt16

Write value as hex string to buffer.

  • @param value - value to write.
  • @param buffer - buffer for resultant string.

static void writeUInt16(v_uint16 value, p_char8 buffer)

# Hex::writeUInt32

Write value as hex string to buffer.

  • @param value - value to write.
  • @param buffer - buffer for resultant string.

static void writeUInt32(v_uint32 value, p_char8 buffer)

# Hex::readUInt16

Parse 4-char hex string to int16.

  • @param buffer - buffer containing string to parse.
  • @param value - out parameter. Resultant value.
  • @return - 0 on success. Negative value on failure.

static v_int32 readUInt16(p_char8 buffer, v_uint16& value)

# Hex::readUInt32

Parse 8-char hex string to int32.

  • @param buffer - buffer containing string to parse.
  • @param value - out parameter. Resultant value.
  • @return - 0 on success. Negative value on failure.

static v_int32 readUInt32(p_char8 buffer, v_uint32& value)