DiceKeys Seeded Cryptography Library
|
5 #include "sodium-buffer.hpp"
83 const char indent_char =
' '
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 SodiumBuffer toSerializedBinaryForm() const
Serialize to byte array as a list of: (keyBytes, recipe)
Definition: packaged-sealed-message.cpp:30
When a message is sealed, the ciphertext is packaged with the recipe in JSON Format for Recipes,...
Definition: packaged-sealed-message.hpp:14
PackagedSealedMessage(const std::vector< unsigned char > &ciphertext, const std::string &recipe, const std::string &unsealingInstructions)
Construct directly from the constituent members.
Definition: packaged-sealed-message.cpp:14
static PackagedSealedMessage fromSerializedBinaryForm(const SodiumBuffer &serializedBinaryForm)
Deserialize from a byte array stored as a list of: (keyBytes, recipe)
Definition: packaged-sealed-message.cpp:41
const std::vector< unsigned char > ciphertext
The sealed message as a raw array of bytes.
Definition: packaged-sealed-message.hpp:20
const std::string unsealingInstructions
Optional public instructions that the sealer requests the unsealer to follow as a condition of unseal...
Definition: packaged-sealed-message.hpp:30
const std::string toJson(int indent=-1, const char indent_char=' ') const
Serialize this object to a JSON-formatted string.
Definition: packaged-sealed-message.cpp:46
static PackagedSealedMessage fromJson(const std::string &packagedSealedMessageAsJson)
Construct by reconstituting this object from a JSON string.
Definition: packaged-sealed-message.cpp:61
const std::string recipe
The recipe used to generate the encryption/decryption keys.
Definition: packaged-sealed-message.hpp:25