Documentation ¶
Overview ¶
Package rsa provides a mockable wrapper for crypto/rsa.
Index ¶
- type Impl
- func (*Impl) DecryptOAEP(hash hash.Hash, random io.Reader, priv *rsa.PrivateKey, ciphertext []byte, ...) ([]byte, error)
- func (*Impl) DecryptPKCS1v15(rand io.Reader, priv *rsa.PrivateKey, ciphertext []byte) ([]byte, error)
- func (*Impl) DecryptPKCS1v15SessionKey(rand io.Reader, priv *rsa.PrivateKey, ciphertext []byte, key []byte) error
- func (*Impl) EncryptOAEP(hash hash.Hash, random io.Reader, pub *rsa.PublicKey, msg []byte, label []byte) ([]byte, error)
- func (*Impl) EncryptPKCS1v15(rand io.Reader, pub *rsa.PublicKey, msg []byte) ([]byte, error)
- func (*Impl) GenerateKey(random io.Reader, bits int) (*rsa.PrivateKey, error)
- func (*Impl) GenerateMultiPrimeKey(random io.Reader, nprimes int, bits int) (*rsa.PrivateKey, error)
- func (*Impl) SignPKCS1v15(rand io.Reader, priv *rsa.PrivateKey, hash crypto.Hash, hashed []byte) ([]byte, error)
- func (*Impl) SignPSS(rand io.Reader, priv *rsa.PrivateKey, hash crypto.Hash, digest []byte, ...) ([]byte, error)
- func (*Impl) VerifyPKCS1v15(pub *rsa.PublicKey, hash crypto.Hash, hashed []byte, sig []byte) error
- func (*Impl) VerifyPSS(pub *rsa.PublicKey, hash crypto.Hash, digest []byte, sig []byte, ...) error
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Impl ¶
type Impl struct{}
func (*Impl) DecryptOAEP ¶
func (*Impl) DecryptPKCS1v15 ¶
func (*Impl) DecryptPKCS1v15SessionKey ¶
func (*Impl) EncryptOAEP ¶
func (*Impl) EncryptPKCS1v15 ¶
func (*Impl) GenerateKey ¶
func (*Impl) GenerateMultiPrimeKey ¶
func (*Impl) SignPKCS1v15 ¶
func (*Impl) VerifyPKCS1v15 ¶
type Interface ¶
type Interface interface { DecryptOAEP(hash hash.Hash, random io.Reader, priv *rsa.PrivateKey, ciphertext []byte, label []byte) ([]byte, error) DecryptPKCS1v15(rand io.Reader, priv *rsa.PrivateKey, ciphertext []byte) ([]byte, error) DecryptPKCS1v15SessionKey(rand io.Reader, priv *rsa.PrivateKey, ciphertext []byte, key []byte) error EncryptOAEP(hash hash.Hash, random io.Reader, pub *rsa.PublicKey, msg []byte, label []byte) ([]byte, error) EncryptPKCS1v15(rand io.Reader, pub *rsa.PublicKey, msg []byte) ([]byte, error) GenerateKey(random io.Reader, bits int) (*rsa.PrivateKey, error) GenerateMultiPrimeKey(random io.Reader, nprimes int, bits int) (*rsa.PrivateKey, error) SignPKCS1v15(rand io.Reader, priv *rsa.PrivateKey, hash crypto.Hash, hashed []byte) ([]byte, error) SignPSS(rand io.Reader, priv *rsa.PrivateKey, hash crypto.Hash, digest []byte, opts *rsa.PSSOptions) ([]byte, error) VerifyPKCS1v15(pub *rsa.PublicKey, hash crypto.Hash, hashed []byte, sig []byte) error VerifyPSS(pub *rsa.PublicKey, hash crypto.Hash, digest []byte, sig []byte, opts *rsa.PSSOptions) error }
Click to show internal directories.
Click to hide internal directories.