From 64cf474f277774474fc70ff00d117ebcba59ee24 Mon Sep 17 00:00:00 2001 From: Wei Yang Date: Sat, 21 Oct 2017 22:32:49 +0800 Subject: [PATCH] fix private key display --- cli_explore.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cli_explore.go b/cli_explore.go index 9b6c4dd..c6e39a5 100644 --- a/cli_explore.go +++ b/cli_explore.go @@ -7,12 +7,10 @@ import ( func (cli *CLI) generateKey() { private, public := newKeyPair() + fmt.Println("Private Key:") + fmt.Println(hex.EncodeToString(private.D.Bytes())) fmt.Println("Public Key:") fmt.Println(hex.EncodeToString(public)) - priKey := append(private.PublicKey.X.Bytes(), private.PublicKey.Y.Bytes()...) - priKey = append(priKey, private.D.Bytes()...) - fmt.Println("Private Key:") - fmt.Printf("%d%s\n", private.Curve, hex.EncodeToString(priKey)) } func (cli *CLI) getAddress(pubKey string) {