From 9ae59aa55b4bc0deeb99a08efd1aabd446efb72f Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Mon, 30 Mar 2020 11:10:00 -0700 Subject: [PATCH] Ed25519PublicKeyFromString: Show invalid public key in error message --- crypto.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto.go b/crypto.go index 1dfed7076..cfa4e43f3 100644 --- a/crypto.go +++ b/crypto.go @@ -256,7 +256,7 @@ func Ed25519PublicKeyFromString(s string) (Ed25519PublicKey, error) { return pk, nil } } - return Ed25519PublicKey{}, newErrBadKeyf("invalid public key string with length %v", len(s)) + return Ed25519PublicKey{}, newErrBadKeyf("invalid public key '%v' string with length %v", s, len(s)) } // Ed25519PublicKeyFromBytes constructs a known Ed25519PublicKey from its text-encoded representation.