Mnemonic Generator.
More...
#include <Mnemonic.h>
|
enum | Language { ENGLISH
} |
| Supported languages.
|
|
using | WordList = std::vector< std::string > |
| A list of words.
|
|
|
static size_t const | NUM_LANGUAGES = Language::ENGLISH + 1 |
| Number of supported languages.
|
|
Equity::Mnemonic::Mnemonic |
( |
WordList const & |
words | ) |
|
|
explicit |
- Parameters
-
- Note
- If the mnemonic is not valid, invalid size or checksum, then isValid() will return false.
Equity::Mnemonic::Mnemonic |
( |
uint8_t const * |
entropy, |
|
|
size_t |
size, |
|
|
Language |
language = ENGLISH |
|
) |
| |
- Parameters
-
entropy | entropy source for the mnemonic |
size | size of entropy data |
language | word list language (default: English) |
- Note
- The entropy data does not include a checksum
-
The size of the entropy must be a multiple of 4. If not, isValid() will return false.
Equity::Mnemonic::Mnemonic |
( |
std::vector< uint8_t > const & |
entropy, |
|
|
Language |
language = ENGLISH |
|
) |
| |
|
inlineexplicit |
- Parameters
-
entropy | entropy source |
language | word list language (default: English) |
- Note
- The entropy data does not include a checksum
-
The size of the entropy must be a multiple of 4. If not, isValid() will return false.
std::vector< uint8_t > Equity::Mnemonic::seed |
( |
char const * |
password = "" | ) |
const |
Returns the 512-bit seed computed from the mnemonic sentence.
- Parameters
-
password | password used to generate the seed (default: "") |
- Returns
- A 512-bit seed value
std::string Equity::Mnemonic::sentence |
( |
| ) |
const |
Returns the mnemonic sentence.
The sentence is simply a string containing the words in order separated by a spaces.
Mnemonic::WordList Equity::Mnemonic::suggestions |
( |
std::string const & |
word, |
|
|
size_t |
max = 0 |
|
) |
| const |
Returns a list of the possible words given a partial word hint.
- Parameters
-
word | partial word to test |
max | maximum number of suggestions to return |
- Returns
- list of suggestions
The documentation for this class was generated from the following files: