When a message is sealed, the ciphertext is packaged with the recipe in JSON Format for Recipes, as well as any optional unsealing instructions it was sealed with (unsealingInstructions).
More...
#include <packaged-sealed-message.hpp>
|
const std::vector< unsigned char > | ciphertext |
| The sealed message as a raw array of bytes.
|
|
const std::string | recipe |
| The recipe used to generate the encryption/decryption keys.
|
|
const std::string | unsealingInstructions |
| Optional public instructions that the sealer requests the unsealer to follow as a condition of unsealing.
|
|
When a message is sealed, the ciphertext is packaged with the recipe in JSON Format for Recipes, as well as any optional unsealing instructions it was sealed with (unsealingInstructions).
◆ PackagedSealedMessage() [1/2]
PackagedSealedMessage::PackagedSealedMessage |
( |
const std::vector< unsigned char > & |
ciphertext, |
|
|
const std::string & |
recipe, |
|
|
const std::string & |
unsealingInstructions |
|
) |
| |
Construct directly from the constituent members.
- Parameters
-
ciphertext | The binary sealed message |
recipe | The recipe used to generate the encryption/decryption keys. |
unsealingInstructions | Optional public instructions that the sealer requests the unsealer to follow as a condition of unsealing. |
◆ PackagedSealedMessage() [2/2]
The copy constructor
- Parameters
-
other | An object of the same time to copy. |
◆ fromJson()
Construct by reconstituting this object from a JSON string.
- Parameters
-
packagedSealedMessageAsJson | The JSON encoding of this object generated by a call to toJson |
◆ fromSerializedBinaryForm()
Deserialize from a byte array stored as a list of: (keyBytes, recipe)
Stored in SodiumBuffer's fixed-length list format. Strings are stored as UTF8 byte arrays.
◆ toJson()
const std::string PackagedSealedMessage::toJson |
( |
int |
indent = -1 , |
|
|
const char |
indent_char = ' ' |
|
) |
| const |
Serialize this object to a JSON-formatted string.
It can be reconstituted by calling the constructor with this string.
- Parameters
-
indent | The number of characters to indent the JSON (optional) |
indent_char | The character with which to indent the JSON (optional) |
- Returns
- const std::string
◆ toSerializedBinaryForm()
const SodiumBuffer PackagedSealedMessage::toSerializedBinaryForm |
( |
| ) |
const |
Serialize to byte array as a list of: (keyBytes, recipe)
Stored in SodiumBuffer's fixed-length list format. Strings are stored as UTF8 byte arrays.
The documentation for this class was generated from the following files:
- C:/Users/stuar/git/dicekeys-seeded-crypto/lib-seeded/packaged-sealed-message.hpp
- C:/Users/stuar/git/dicekeys-seeded-crypto/lib-seeded/packaged-sealed-message.cpp