From 7d6898677bc2c7bc001e810d1baf100b1e8671f7 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 21 Jul 2021 17:05:49 +0300 Subject: [PATCH] keys: trivial code simplification --- pkg/crypto/keys/publickey.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/crypto/keys/publickey.go b/pkg/crypto/keys/publickey.go index b7954bdd1..bf579ec06 100644 --- a/pkg/crypto/keys/publickey.go +++ b/pkg/crypto/keys/publickey.go @@ -338,8 +338,7 @@ func (p *PublicKey) Verify(signature []byte, hash []byte) bool { } rBytes := new(big.Int).SetBytes(signature[0:32]) sBytes := new(big.Int).SetBytes(signature[32:64]) - pk := ecdsa.PublicKey(*p) - return ecdsa.Verify(&pk, hash, rBytes, sBytes) + return ecdsa.Verify((*ecdsa.PublicKey)(p), hash, rBytes, sBytes) } // VerifyHashable returns true if the signature is valid and corresponds