forked from TrueCloudLab/frostfs-sdk-go
[#93] Remove golang.org/x/crypto dependency
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
a2572a23a3
commit
2806d90089
18 changed files with 97 additions and 144 deletions
|
@ -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()))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue