[#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

@ -2,11 +2,10 @@ package eacl
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"fmt"
"testing"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl"
checksumtest "github.com/nspcc-dev/neofs-sdk-go/checksum/test"
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
@ -252,7 +251,7 @@ func TestReservedRecords(t *testing.T) {
}
func randomPublicKey(t *testing.T) *ecdsa.PublicKey {
p, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
p, err := keys.NewPrivateKey()
require.NoError(t, err)
return &p.PublicKey
return &p.PrivateKey.PublicKey
}