| DiceKeys Seeded Cryptography Library
    | 
 
 
 
    6 #include "sodium-buffer.hpp" 
    7 #include "packaged-sealed-message.hpp" 
   73     const char indent_char = 
' ' 
   96     const std::string& unsealingInstructions = {}
 
  118     const unsigned char* message,
 
  119     const size_t messageLength,
 
  121     const std::string& unsealingInstructions = {}
 
  136     const unsigned char* message,
 
  137     const size_t messageLength,
 
  138     const std::string& unsealingInstructions = {}
 
  151     const std::string& unsealingInstructions = {}
 
  169     const std::string& unsealingInstructions
 
  185     const std::vector<unsigned char>& message,
 
  186     const std::string& unsealingInstructions = 
"" 
  204     const std::string& message,
 
  205     const std::string& unsealingInstructions = {}
 
  223     const unsigned char* message,
 
  224     const size_t messageLength,
 
  225     const std::string& unsealingInstructions
 
  
 
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: (sealingKeyBytes, recipe)
Definition: sealing-key.cpp:146
const std::string recipe
A JSON Format for Recipes string used to specify how this key is derived.
Definition: sealing-key.hpp:52
SealingKey(const std::vector< unsigned char > &sealingKeyBytes, const std::string &recipe)
Construct a new Public Key object by passing its members.
Definition: sealing-key.cpp:14
const std::string toJson(int indent=-1, const char indent_char=' ') const
Serialize this object to a JSON-formatted string.
Definition: sealing-key.cpp:35
When a message is sealed, the ciphertext is packaged with the recipe in JSON Format for Recipes,...
Definition: packaged-sealed-message.hpp:14
A sealingKeyBytes is used to seal messages, in combination with a UnsealingKey which can unseal them....
Definition: sealing-key.hpp:36
const std::vector< unsigned char > getSealingKeyBytes() const
Get the copy of the raw public key bytes used by lib-sodium.
Definition: sealing-key.cpp:141
const std::string getRecipeJson() const
Get the JSON-formatted recipe string used to generate the public-private key pair.
Definition: sealing-key.hpp:241
static const std::vector< unsigned char > sealToCiphertextOnly(const SodiumBuffer &message, const std::vector< unsigned char > &sealingKeyBytes, const std::string &unsealingInstructions={})
Avoid Using Seal a message using a raw libsodium public key.
Definition: sealing-key.cpp:75
static SealingKey fromSerializedBinaryForm(const SodiumBuffer &serializedBinaryForm)
Deserialize from a byte array stored as a list of: (sealingKeyBytes, recipe)
Definition: sealing-key.cpp:156
const PackagedSealedMessage seal(const SodiumBuffer &message, const std::string &unsealingInstructions) const
Seal a plaintext message and then package the results along with its recipe and unsealingInstructions...
Definition: sealing-key.cpp:111
static SealingKey fromJson(const std::string &sealingKeyAsJson)
Construct a sealingKeyBytes from a JSON string.
Definition: sealing-key.cpp:23
const std::vector< unsigned char > sealingKeyBytes
The binary representation of the public key used for sealing.
Definition: sealing-key.hpp:48