[#93] Remove golang.org/x/crypto dependency

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2021-12-10 16:56:04 +03:00 committed by Alex Vanin
parent a2572a23a3
commit 2806d90089
18 changed files with 97 additions and 144 deletions

View file

@ -1,11 +1,10 @@
package object
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"testing"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/stretchr/testify/require"
)
@ -18,9 +17,9 @@ func TestVerificationFields(t *testing.T) {
obj.SetPayload(payload)
obj.SetPayloadSize(uint64(len(payload)))
p, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
p, err := keys.NewPrivateKey()
require.NoError(t, err)
require.NoError(t, SetVerificationFields(p, obj))
require.NoError(t, SetVerificationFields(&p.PrivateKey, obj))
require.NoError(t, CheckVerificationFields(obj.Object()))