mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-06-18 04:00:03 +02:00
search: define a key_result struct and store position and length in public key for the word found.
This commit is contained in:
parent
8c8d88c631
commit
075144c72b
4 changed files with 26 additions and 14 deletions
|
|
@ -35,10 +35,10 @@ void KeySearch::_search_linear(size_t n) {
|
|||
struct ec_keypair pair;
|
||||
|
||||
while (count < n) {
|
||||
std::string word;
|
||||
struct key_result res;
|
||||
ec_generate_key(&pair);
|
||||
if (key_contains_word(&pair, m_words, word)) {
|
||||
key_search_result(word, &pair);
|
||||
if (key_contains_word(&pair, m_words, &res)) {
|
||||
key_search_result(&pair, &res);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue