OSDN Git Service

feat: add node discovery and status check (#374)
[bytom/vapor.git] / crypto / ed25519 / ed25519.go
index 530b08b..aa22b5b 100644 (file)
@@ -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)