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

Move print_key() from main.cpp to WIF module (named wif_print_key)

This commit is contained in:
Henrik Hautakoski 2020-01-09 06:34:32 +01:00
parent 76e3d11747
commit 8ae7a24e27
3 changed files with 11 additions and 8 deletions

View file

@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <iostream>
#include <string.h>
#include "base58.h"
#include "checksum.h"
@ -50,3 +51,9 @@ std::string wif_pub_encode(ec_pubkey_t pub) {
return "EOS" + base58_encode(buf, buf + sizeof(buf));
}
void wif_print_key(struct ec_keypair *key) {
std::cout << "Private: " << wif_priv_encode(key->secret) << std::endl;
std::cout << "Public: " << wif_pub_encode(key->pub) << std::endl;
}