mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-07-03 11:53:41 +02:00
src/main.cpp: Do case insensitive search
This commit is contained in:
parent
fd03346255
commit
c5ebd757fa
1 changed files with 3 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
#include <algorithm>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
@ -43,11 +44,13 @@ static void search(const char *words, size_t n) {
|
||||||
std::cout << "Searching for " << n << " keys containing: " << words << std::endl;
|
std::cout << "Searching for " << n << " keys containing: " << words << std::endl;
|
||||||
|
|
||||||
word_list = strsplit(words, ",");
|
word_list = strsplit(words, ",");
|
||||||
|
std::for_each(word_list.begin(), word_list.end(), strtolower);
|
||||||
|
|
||||||
while (count < n) {
|
while (count < n) {
|
||||||
std::string pubstr;
|
std::string pubstr;
|
||||||
ec_generate_key(&pair);
|
ec_generate_key(&pair);
|
||||||
pubstr = wif_pub_encode(pair.pub);
|
pubstr = wif_pub_encode(pair.pub);
|
||||||
|
strtolower(pubstr);
|
||||||
|
|
||||||
for(auto const& word: word_list) {
|
for(auto const& word: word_list) {
|
||||||
if (pubstr.find(word) != std::string::npos) {
|
if (pubstr.find(word) != std::string::npos) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue