[#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,9 +2,9 @@ package eacl
import (
"crypto/ecdsa"
"crypto/elliptic"
"testing"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neofs-api-go/v2/acl"
v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl"
"github.com/stretchr/testify/require"
@ -25,8 +25,7 @@ func TestTarget(t *testing.T) {
require.Equal(t, v2acl.RoleSystem, v2.GetRole())
require.Len(t, v2.GetKeys(), len(pubs))
for i, key := range v2.GetKeys() {
b := elliptic.MarshalCompressed(pubs[i].Curve, pubs[i].X, pubs[i].Y)
require.Equal(t, key, b)
require.Equal(t, key, (*keys.PublicKey)(pubs[i]).Bytes())
}
newTarget := NewTargetFromV2(v2)