11#ifndef __BE_MEMORY_INDEXEDBUFFER__
12#define __BE_MEMORY_INDEXEDBUFFER__
228 virtual const uint8_t*
242 const uint8_t *
const _data;
245 const uint64_t _size;
Wrap a memory buffer with an index.
IndexedBuffer(const IndexedBuffer ©)=default
Copy constructor (default).
uint64_t scan(void *buf, uint64_t len)
Obtain the next 'n' elements of the buffer and increment the current index value by n.
uint32_t scanU32Val()
Obtain the next four elements of the buffer and increment the current index value by four.
void setIndex(uint64_t index)
Set the current index into the buffer.
uint8_t scanU8Val()
Obtain the next element of the buffer and increment the current index value.
uint16_t scanU16Val()
Obtain the next two elements of the buffer and increment the current index value.
virtual ~IndexedBuffer()=default
Destructor (default).
virtual const uint8_t * get() const
Returns a pointer to the managed buffer.
uint32_t scanBeU32Val()
Obtain the next four elements of the buffer, scanned as a big-endian value, and increment the current...
IndexedBuffer(const uint8Array &aa)
Wrap an existing uint8Array.
uint64_t scanU64Val()
Obtain the next eight elements of the buffer and increment the current index value by eight.
IndexedBuffer()
Wrap a nullptr buffer.
uint32_t getIndex() const
Obtain the current index into the buffer.
uint16_t scanBeU16Val()
Obtain the next two elements of the buffer, scanned as a big-endian value, and increment the current ...
uint32_t getSize() const
Obtain the current size of the buffer.
IndexedBuffer(const uint8_t *data, uint64_t size)
Wrap an existing buffer of a given length.
This software was developed at the National Institute of Standards and Technology (NIST) by employees...