Go to the source code of this file.
|
| | TEST (mnemonics, consistency) |
| |
| | TEST (mnemonics, all_languages) |
| |
| | TEST (mnemonics, language_detection_with_bad_checksum) |
| |
| | TEST (mnemonics, utf8prefix) |
| |
| | TEST (mnemonics, case_tolerance) |
| |
| | TEST (mnemonics, partial_word_tolerance) |
| |
◆ TEST() [1/6]
| TEST |
( |
mnemonics |
, |
|
|
consistency |
|
|
) |
| |
Definition at line 151 of file mnemonics.cpp.
154 std::vector<std::string> language_list;
157 catch(
const std::exception &e)
159 std::cout <<
"Error initializing mnemonics: " << e.what() << std::endl;
std::vector< const Language::Base * > get_language_list()
#define ASSERT_TRUE(condition)
◆ TEST() [2/6]
| TEST |
( |
mnemonics |
, |
|
|
all_languages |
|
|
) |
| |
Definition at line 164 of file mnemonics.cpp.
167 std::vector<Language::Base*> languages({
182 for (std::vector<Language::Base*>::iterator it = languages.begin(); it != languages.end(); it++)
185 test_language(*(*it));
187 catch (
const std::exception &e) {
188 std::cout <<
"Error testing " << (*it)->get_language_name() <<
" language: " << e.what() << std::endl;
#define ASSERT_TRUE(condition)
◆ TEST() [3/6]
| TEST |
( |
mnemonics |
, |
|
|
language_detection_with_bad_checksum |
|
|
) |
| |
Definition at line 194 of file mnemonics.cpp.
201 const std::string base_seed =
"cinzento luxuriante leonardo gnostico digressao cupula fifa broxar iniquo louvor ovario dorsal ideologo besuntar decurso rosto susto lemure unheiro pagodeiro nitroglicerina eclusa mazurca bigorna";
bool words_to_bytes(const epee::wipeable_string &words, epee::wipeable_string &dst, size_t len, bool duplicate, std::string &language_name)
Converts seed words to bytes (secret key).
#define ASSERT_EQ(val1, val2)
#define ASSERT_STREQ(s1, s2)
◆ TEST() [4/6]
| TEST |
( |
mnemonics |
, |
|
|
utf8prefix |
|
|
) |
| |
Definition at line 213 of file mnemonics.cpp.
#define ASSERT_TRUE(condition)
T utf8prefix(const T &s, size_t count)
Returns a string made of (at most) the first count characters in s. Assumes well formedness. No check is made for this.
◆ TEST() [5/6]
| TEST |
( |
mnemonics |
, |
|
|
case_tolerance |
|
|
) |
| |
Definition at line 227 of file mnemonics.cpp.
233 const std::string seed_1 =
"Neubau umarmen Abart umarmen Turban feilen Brett Bargeld Episode Milchkuh Substanz Jahr Armband Maibaum Tand Grünalge Tabak erziehen Federboa Lobrede Tenor Leuchter Curry Diskurs Tenor";
241 std::string seed_2 =
"neubau umarmen Abart umarmen Turban feilen Brett Bargeld Episode Milchkuh Substanz Jahr Armband Maibaum Tand Grünalge Tabak erziehen Federboa Lobrede Tenor Leuchter Curry Diskurs tenor";
242 boost::algorithm::to_lower(seed_2);
bool words_to_bytes(const epee::wipeable_string &words, epee::wipeable_string &dst, size_t len, bool duplicate, std::string &language_name)
Converts seed words to bytes (secret key).
#define ASSERT_EQ(val1, val2)
#define ASSERT_STREQ(s1, s2)
#define ASSERT_TRUE(condition)
◆ TEST() [6/6]
| TEST |
( |
mnemonics |
, |
|
|
partial_word_tolerance |
|
|
) |
| |
Definition at line 250 of file mnemonics.cpp.
256 const std::string seed_1 =
"crim bam scamp gna limi woma wron tuit birth mundane donuts square cohesive dolphin titans narrate fue saved wrap aloof magic mirr toget upda wra";
bool words_to_bytes(const epee::wipeable_string &words, epee::wipeable_string &dst, size_t len, bool duplicate, std::string &language_name)
Converts seed words to bytes (secret key).
#define ASSERT_EQ(val1, val2)
#define ASSERT_STREQ(s1, s2)