Documentation
¶
Overview ¶
Package crypto implements verification interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEmptyPrivateKey = errors.New("trying to sign without private key")
)
Functions ¶
This section is empty.
Types ¶
type RSAPSS ¶
type RSAPSS struct {
// contains filtered or unexported fields
}
RSAPSS represents RSA PSS algo for signing/verification (with SHA256 as digest calculation function).
type Signer ¶
type Signer interface {
// Name returns name of the crypto algorithm, used by signer.
Name() string
// Sign returns signature for passed data.
Sign(data []byte) ([]byte, error)
}
Signer implements high-level API for package signing.
type SignerVerifier ¶
SignerVerifier common interface.
func NewRSAPSSSignerVerifier ¶
func NewRSAPSSSignerVerifier(privKey rsa.PrivateKey) SignerVerifier
NewRSAPSSSignerVerifier creates new RSAPSS object that can both sign and verify. The public key is derived from the private key.
type Verifier ¶
type Verifier interface {
// Name returns name of the crypto algorithm, used by verifier.
Name() string
// Verify checks data and signature mapping.
Verify(data []byte, signature []byte) error
}
Verifier is an interface implementing a generic signature verification algorithm.
func NewRSAPSSVerifier ¶
NewRSAPSSVerifier creates new RSAPSS object that can only verify signatures.
Click to show internal directories.
Click to hide internal directories.