DiceKeys Seeded Cryptography Library
|
3 #include "sodium-buffer.hpp"
50 const std::string&
recipe = {}
63 const std::string& seedString,
77 const std::string& seedString,
93 const char indent_char =
' '
122 const std::string& seedAsJson
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: (secretBytes, recipe)
Definition: secret.cpp:70
const std::string recipe
A string in JSON Format for Recipes string which specifies how the constructor will derive the secret...
Definition: secret.hpp:30
const std::string toJson(int indent=-1, const char indent_char=' ') const
Serialize this object to a JSON-formatted string.
Definition: secret.cpp:57
static Secret deriveFromSeed(const std::string &seedString, const std::string &recipe)
Derive a secret from a seed secret and a set of recipe in JSON Format for Recipes.
Definition: secret.cpp:21
static Secret fromSerializedBinaryForm(const SodiumBuffer &serializedBinaryForm)
Deserialize from a byte array stored as a list of: (secretBytes, recipe)
Definition: secret.cpp:78
static Secret fromJson(const std::string &seedAsJson)
Construct (reconstitute) a Secret from its JSON representation.
Definition: secret.cpp:44
Secret(const Secret &other)
Construct this object as a copy of another object.
Definition: secret.cpp:36
A secret derived from a seed string and set of options in JSON Format for Recipes.
Definition: secret.hpp:19
const SodiumBuffer secretBytes
The binary representation of the derived secret.
Definition: secret.hpp:24