mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
* refactor: update import paths in gateway handlers * refactor: remove obsolete devtools Makefile and README * build: optimize build process for improved efficiency * refactor: remove obsolete pkl files related to Matrix and Sonr network configurations * refactor: move embed code to x/dwn/types
33 lines
597 B
Go
Executable File
33 lines
597 B
Go
Executable File
//
|
|
// 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/sonr/internal/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)
|
|
}
|