Documentation ¶
Index ¶
- Constants
- func Unmarshal(sigstr string) (signer.Signature, error)
- func VerifyGenericRsaSignatureResponse(input []byte, sr formats.SignatureResponse) error
- func VerifySignature(input, sigBytes []byte, pubKey *rsa.PublicKey, sigopt interface{}, mode string) (err error)
- type Options
- type RSASigner
- type Signature
Constants ¶
View Source
const ( // ModePSS enables PSS padding mode ModePSS = "pss" // ModePKCS15 enables PKCS15 padding mode ModePKCS15 = "pkcs15" )
View Source
const (
// Type of this signer is "genericrsa"
Type = "genericrsa"
)
Variables ¶
This section is empty.
Functions ¶
func VerifyGenericRsaSignatureResponse ¶
func VerifyGenericRsaSignatureResponse(input []byte, sr formats.SignatureResponse) error
VerifyGenericRsaSignatureResponse is a helper that takes an input and autograph signature response and verify its signature.
Types ¶
type Options ¶
type Options struct { // Hash, if not zero, overrides the hash function passed to SignPSS. // This is the only way to specify the hash function when using the // crypto.Signer interface. Hash crypto.Hash }
Options contains options for creating and verifying PKCS15 signatures.
type RSASigner ¶
type RSASigner struct { signer.Configuration // contains filtered or unexported fields }
RSASigner holds the configuration of the signer
func New ¶
func New(conf signer.Configuration) (s *RSASigner, err error)
New initializes a rsa signer using a configuration
func (*RSASigner) Config ¶
func (s *RSASigner) Config() signer.Configuration
Config returns the configuration of the current signer
func (*RSASigner) GetDefaultOptions ¶
func (s *RSASigner) GetDefaultOptions() interface{}
GetDefaultOptions returns default options of the signer
Click to show internal directories.
Click to hide internal directories.