mirror of
https://github.com/arnaucube/go-iden3-crypto.git
synced 2026-02-07 11:36:41 +01:00
init commit for the golden poseidon
This commit is contained in:
18
goldenposeidon/poseidon_test.go
Normal file
18
goldenposeidon/poseidon_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package poseidon
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestPoseidonHash(t *testing.T) {
|
||||
b0 := big.NewInt(0)
|
||||
|
||||
h, err := Hash([]*big.Int{b0, b0, b0, b0, b0, b0, b0, b0}, []*big.Int{b0, b0, b0, b0})
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t,
|
||||
"18586133768512220936620570745912940619677854269274689475585506675881198879027",
|
||||
h.String())
|
||||
}
|
||||
Reference in New Issue
Block a user