-
Notifications
You must be signed in to change notification settings - Fork 0
/
dsa.go
35 lines (29 loc) · 1.09 KB
/
dsa.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Code generated by a tool. DO NOT EDIT.
// Package dsa provides a mockable wrapper for crypto/dsa.
package dsa
import (
dsa "crypto/dsa"
io "io"
big "math/big"
)
var _ Interface = &Impl{}
var _ = dsa.GenerateKey
type Interface interface {
GenerateKey(priv *dsa.PrivateKey, rand io.Reader) error
GenerateParameters(params *dsa.Parameters, rand io.Reader, sizes dsa.ParameterSizes) error
Sign(rand io.Reader, priv *dsa.PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error)
Verify(pub *dsa.PublicKey, hash []byte, r *big.Int, s *big.Int) bool
}
type Impl struct{}
func (*Impl) GenerateKey(priv *dsa.PrivateKey, rand io.Reader) error {
return dsa.GenerateKey(priv, rand)
}
func (*Impl) GenerateParameters(params *dsa.Parameters, rand io.Reader, sizes dsa.ParameterSizes) error {
return dsa.GenerateParameters(params, rand, sizes)
}
func (*Impl) Sign(rand io.Reader, priv *dsa.PrivateKey, hash []byte) (r *big.Int, s *big.Int, err error) {
return dsa.Sign(rand, priv, hash)
}
func (*Impl) Verify(pub *dsa.PublicKey, hash []byte, r *big.Int, s *big.Int) bool {
return dsa.Verify(pub, hash, r, s)
}