diff --git a/pkg/crypto/rfc6979/example_test.go b/pkg/crypto/rfc6979/example_test.go index 29693c272..b756ea80e 100755 --- a/pkg/crypto/rfc6979/example_test.go +++ b/pkg/crypto/rfc6979/example_test.go @@ -26,7 +26,7 @@ func ExampleSignECDSA() { // Hash a message. alg := sha512.New() - alg.Write([]byte("I am a potato.")) + _, _ = alg.Write([]byte("I am a potato.")) hash := alg.Sum(nil) // Sign the message. You don't need a PRNG for this. @@ -59,7 +59,7 @@ func ExampleSignDSA() { // Hash a message. alg := sha1.New() - alg.Write([]byte("I am a potato.")) + _, _ = alg.Write([]byte("I am a potato.")) hash := alg.Sum(nil) // Sign the message. You don't need a PRNG for this. diff --git a/pkg/vm/vmopscrypto.go b/pkg/vm/vmopscrypto.go index e38ab7402..5560c1d80 100644 --- a/pkg/vm/vmopscrypto.go +++ b/pkg/vm/vmopscrypto.go @@ -21,7 +21,7 @@ func SHA1(op stack.Instruction, ctx *stack.Context, istack *stack.Invocation, rs } alg := sha1.New() - alg.Write(ba.Value()) + _, _ = alg.Write(ba.Value()) hash := alg.Sum(nil) res := stack.NewByteArray(hash)