Electroneum
Functions
anonymous_namespace{electrum-words.cpp} Namespace Reference

Functions

uint32_t create_checksum_index (const std::vector< epee::wipeable_string > &word_list, const Language::Base *language)
 Creates a checksum index in the word list array on the list of words. More...
 
bool checksum_test (std::vector< epee::wipeable_string > seed, const Language::Base *language)
 Does the checksum test on the seed passed. More...
 
bool find_seed_language (const std::vector< epee::wipeable_string > &seed, bool has_checksum, std::vector< uint32_t > &matched_indices, Language::Base **language)
 Finds the word list that contains the seed words and puts the indices where matches occured in matched_indices. More...
 

Function Documentation

◆ checksum_test()

bool anonymous_namespace electrum words anonymous_namespace{electrum-words.cpp}::cpp::checksum_test ( std::vector< epee::wipeable_string >  seed,
const Language::Base language 
)

Does the checksum test on the seed passed.

Parameters
seedVector of seed words
unique_prefix_lengththe prefix length of each word to use for checksum
Returns
True if the test passed false if not.

◆ create_checksum_index()

uint32_t anonymous_namespace electrum words anonymous_namespace{electrum-words.cpp}::cpp::create_checksum_index ( const std::vector< epee::wipeable_string > &  word_list,
const Language::Base language 
)

Creates a checksum index in the word list array on the list of words.

Parameters
word_listVector of words
unique_prefix_lengththe prefix length of each word to use for checksum
Returns
Checksum index

◆ find_seed_language()

bool anonymous_namespace{electrum-words.cpp}::find_seed_language ( const std::vector< epee::wipeable_string > &  seed,
bool  has_checksum,
std::vector< uint32_t > &  matched_indices,
Language::Base **  language 
)

Finds the word list that contains the seed words and puts the indices where matches occured in matched_indices.

Parameters
seedList of words to match.
has_checksumThe seed has a checksum word (maybe not checked).
matched_indicesThe indices where the seed words were found are added to this.
languageLanguage instance pointer to write to after it is found.
Returns
true if all the words were present in some language false if not.