mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
(no commit message provided)
This commit is contained in:
committed by
Prad Nukala (aider)
parent
5fd43dfd6b
commit
2f976209db
@@ -1,32 +0,0 @@
|
||||
//
|
||||
// Copyright Coinbase, Inc. All Rights Reserved.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
// Copyright Coinbase, Inc. All Rights Reserved.
|
||||
//
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
package sharing
|
||||
|
||||
import (
|
||||
crand "crypto/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/onsonr/hway/crypto/core/curves"
|
||||
)
|
||||
|
||||
func TestNewPoly(t *testing.T) {
|
||||
curve := curves.BLS12381G1()
|
||||
secret := curve.NewScalar().Hash([]byte("test"))
|
||||
|
||||
poly := new(Polynomial).Init(secret, 4, crand.Reader)
|
||||
require.NotNil(t, poly)
|
||||
|
||||
require.Equal(t, poly.Coefficients[0], secret)
|
||||
}
|
||||
Reference in New Issue
Block a user