DiceKeys Seeded Cryptography Library
|
3 #include "sodium-initializer.hpp"
55 SodiumBuffer(
const std::vector<unsigned char>& bufferData);
86 const std::vector<const SodiumBuffer*>& buffers
129 const std::vector<unsigned char>
toVector()
const;
A byte array containing a length and a pointer to memory (the data field), which ensures data is eras...
Definition: sodium-buffer.hpp:27
const size_t length
The length of the buffer.
Definition: sodium-buffer.hpp:38
unsigned char * data
A pointer to the buffer of bytes.
Definition: sodium-buffer.hpp:33
~SodiumBuffer()
Destroy the SodiumBuffer object, freeing and zero-ing the buffer.
Definition: sodium-buffer.cpp:48
static const SodiumBuffer combineFixedLengthList(const std::vector< const SodiumBuffer * > &buffers)
Create a new SodiumBuffer that stored a fixed-length array of other $n$ other sodium buffers.
Definition: sodium-buffer.cpp:94
const std::vector< SodiumBuffer > splitFixedLengthList(int count) const
Deserialize a fixed-length list of SodiumBuffers that had been serialized to a single buffer via a ca...
Definition: sodium-buffer.cpp:139
const std::vector< unsigned char > toVector() const
Copy the buffer into a byte vector, which by nature of being a standard library class will be stored ...
Definition: sodium-buffer.cpp:52
SodiumBuffer(size_t length=0, const unsigned char *bufferData=NULL)
Construct a new SodiumBuffer by specifying its length and optionally specifying a pointer to a buffer...
Definition: sodium-buffer.cpp:26
const std::string toUtf8String() const
If the data in the buffer represents a UTF8-format string, reconstitute the data back into a UTF8 std...
Definition: sodium-buffer.cpp:58
const std::string toHexString() const
Convert the data in the buffer to a lowercase hex string, which by nature of being stored in a string...
Definition: sodium-buffer.cpp:62
static SodiumBuffer fromHexString(const std::string &hexStr)
Create a SodiumBuffer from a string of hex digits.
Definition: sodium-buffer.cpp:77