X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=crypto%2Fed25519%2Fed25519.go;fp=crypto%2Fed25519%2Fed25519.go;h=aa22b5b97490f2026db18a8044f1c74e28b72285;hp=530b08b3c8134f93986d3ff4af67f66d9da94e5f;hb=001e399d2d0eb8f6956b844e721e2f0a4680ff90;hpb=91c664e4bf08540d413f8cdd087d436c2bae2ac6 diff --git a/crypto/ed25519/ed25519.go b/crypto/ed25519/ed25519.go index 530b08b3..aa22b5b9 100644 --- a/crypto/ed25519/ed25519.go +++ b/crypto/ed25519/ed25519.go @@ -36,6 +36,10 @@ type PublicKey []byte // PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer. type PrivateKey []byte +func (pub PublicKey) String() string { + return hex.EncodeToString(pub) +} + // Public returns the PublicKey corresponding to priv. func (priv PrivateKey) Public() PublicKey { publicKey := make([]byte, PublicKeySize)