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

src/key_search_helpers.cpp: in key_search_result() use console colors to highlight the found word.

This commit is contained in:
Henrik Hautakoski 2020-01-16 14:23:25 +01:00
parent 075144c72b
commit 97b834d11e

View file

@ -1,6 +1,7 @@
#include <iostream>
#include "WIF.h"
#include "console.h"
#include "key_search_helpers.h"
void key_search_result(const struct ec_keypair* key, const struct key_result* result) {
@ -11,7 +12,12 @@ void key_search_result(const struct ec_keypair* key, const struct key_result* re
std::cout << "----" << std::endl;
std::cout << "Found: " << word << std::endl;
std::cout << "Public: " << pub << std::endl;
std::cout << "Public: "
<< pub.substr(0, result->pos)
<< console::fg(console::red, console::bold) << word << console::reset
<< pub.substr(result->pos + result->len)
<< std::endl;
std::cout << "Private: " << wif_priv_encode(key->secret) << std::endl;
}