41 const uint8_t *next_ptr;
44 uint8_t control = *next_ptr++;
45 size_t remaining = next_length - 1;
61 return next_ptr + remaining;
const uint8_t * m_current_base
uint8_t * ptr
Pointer to the end of the used part of the buffer.
const uint8_t * add(const uint8_t *ptr) override
Compatibility Macros for C/C++.
bool load(const SerializedKey &key)
Parses the opaque key and loads the components into the member variables.
Functions to serialize/deserialize primitives to/from a memory buffer.
void load(Key &key) override
const uint8_t * ptr
The pointer to the serialized data.
void encode_vi32(uint8_t **bufp, uint32_t val)
Encode a integer (up to 32-bit) in variable length encoding.
void clear()
Clears the buffer.
size_t decode_length(const uint8_t **dptr) const
Retrieves the decoded length and returns a pointer to the string.
Provides access to internal components of opaque key.
uint8_t * base
Pointer to the allocated memory buffer.
SerializedKey m_serialized_key
void ensure(size_t len)
Ensure space for additional data Will grow the space to 1.5 of the needed space with existing data un...
uint32_t decode_vi32(const uint8_t **bufp, size_t *remainp)
Decode a variable length encoded integer up to 32-bit.
uint8_t * add_unchecked(const void *data, size_t len)
Adds additional data without boundary checks.
bool less_than(SerializedKey serialized_key) override