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

Function BenchmarkDSASign

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

Source from the content-addressed store, hash-verified

74}
75
76func BenchmarkDSASign(b *testing.B) {
77 dsaInstance := dsa.New()
78 params := dsaInstance.GetParameters()
79 privKey := dsaInstance.GetPrivateKey()
80 for i := 0; i < b.N; i++ {
81 dsa.Sign(
82 []byte("Hello, World!"),
83 params.P,
84 params.Q,
85 params.G,
86 privKey,
87 )
88 }
89}
90
91func BenchmarkDSAVerify(b *testing.B) {
92 dsaInstance := dsa.New()

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected