1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-18 04:00:03 +02:00

refactor struct key_search_result from src/key_search_helpers.h to include/eoskeygen/key_search.h

This commit is contained in:
Henrik Hautakoski 2020-03-19 15:43:49 +01:00
parent 8035e3233c
commit a417390bb7
5 changed files with 36 additions and 32 deletions

View file

@ -31,6 +31,13 @@ namespace eoskeygen {
class KeySearch
{
public :
struct result {
size_t pos; // position where the word was found.
size_t len; // the length of the word.
};
public :
// Add a word to search for.
void addWord(const std::string& str);
@ -56,6 +63,10 @@ public :
protected :
// Check if any word in <word_list> appears in <key>'s public key.
// returns true if a word was found (stored in <result>), false otherwise.
bool _contains_word(const struct ec_keypair* key, struct result& result);
#ifdef HAVE_THREADS
void _thr_proc();