MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / BenchmarkDSAVerify

Function BenchmarkDSAVerify

cipher/dsa/dsa_test.go:91–114  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

89}
90
91func BenchmarkDSAVerify(b *testing.B) {
92 dsaInstance := dsa.New()
93 pubKey := dsaInstance.GetPublicKey()
94 params := dsaInstance.GetParameters()
95 privKey := dsaInstance.GetPrivateKey()
96 r, s := dsa.Sign(
97 []byte("Hello, World!"),
98 params.P,
99 params.Q,
100 params.G,
101 privKey,
102 )
103 for i := 0; i < b.N; i++ {
104 dsa.Verify(
105 []byte("Hello, World!"),
106 r,
107 s,
108 params.P,
109 params.Q,
110 params.G,
111 pubKey,
112 )
113 }
114}

Callers

nothing calls this directly

Calls 6

NewFunction · 0.92
SignFunction · 0.92
VerifyFunction · 0.92
GetParametersMethod · 0.80
GetPublicKeyMethod · 0.45
GetPrivateKeyMethod · 0.45

Tested by

no test coverage detected