MCPcopy Create free account
hub / github.com/DOSNetwork/core / TestBLS

Function TestBLS

sign/bls/bls_test.go:13–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11var suite = suites.MustFind("bn256")
12
13func TestBLS(t *testing.T) {
14 msg := []byte("Hello Boneh-Lynn-Shacham")
15 private, public := NewKeyPair(suite, random.New())
16 sig, err := Sign(suite, private, msg)
17 require.Nil(t, err)
18 err = Verify(suite, public, msg, sig)
19 require.Nil(t, err)
20}
21
22func TestBLSFailSig(t *testing.T) {
23 msg := []byte("Hello Boneh-Lynn-Shacham")

Callers

nothing calls this directly

Calls 4

NewKeyPairFunction · 0.85
SignFunction · 0.70
VerifyFunction · 0.70
NewMethod · 0.65

Tested by

no test coverage detected