MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / TestInvalidRecoveryID

Function TestInvalidRecoveryID

crypto/secp256k1/secp256_test.go:86–95  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

84}
85
86func TestInvalidRecoveryID(t *testing.T) {
87 _, seckey := generateKeyPair()
88 msg := csprngEntropy(32)
89 sig, _ := Sign(msg, seckey)
90 sig[64] = 99
91 _, err := RecoverPubkey(msg, sig)
92 if err != ErrInvalidRecoveryID {
93 t.Fatalf("got %q, want %q", err, ErrInvalidRecoveryID)
94 }
95}
96
97func TestSignAndRecover(t *testing.T) {
98 pubkey1, seckey := generateKeyPair()

Callers

nothing calls this directly

Calls 5

csprngEntropyFunction · 0.85
SignFunction · 0.85
RecoverPubkeyFunction · 0.85
FatalfMethod · 0.80
generateKeyPairFunction · 0.70

Tested by

no test coverage detected