Versions in this module Expand all Collapse all v2 v2.3.3 Oct 19, 2023 Changes in this version + const RSA_OAEP + const RSA_PKCS1 + const RSA_PSS + func New(keyType crypto.KeyType) (crypto.PrivateKey, error) + func NewDecryptionKey(keyType crypto.KeyType) (crypto.DecryptKey, error) + type PrivateKey struct + K *rsa.PrivateKey + func (sk *PrivateKey) Bytes() ([]byte, error) + func (sk *PrivateKey) Decrypt(ciphertext []byte) ([]byte, error) + func (sk *PrivateKey) DecryptWithOpts(ciphertext []byte, opts *crypto.EncOpts) ([]byte, error) + func (sk *PrivateKey) EncryptKey() crypto.EncryptKey + func (sk *PrivateKey) PublicKey() crypto.PublicKey + func (sk *PrivateKey) Sign(data []byte) ([]byte, error) + func (sk *PrivateKey) SignWithOpts(data []byte, opts *crypto.SignOpts) ([]byte, error) + func (sk *PrivateKey) String() (string, error) + func (sk *PrivateKey) ToStandardKey() crypto2.PrivateKey + func (sk *PrivateKey) Type() crypto.KeyType + type PublicKey struct + K *rsa.PublicKey + func (pk *PublicKey) Bytes() ([]byte, error) + func (pk *PublicKey) Encrypt(data []byte) ([]byte, error) + func (pk *PublicKey) EncryptWithOpts(data []byte, opts *crypto.EncOpts) ([]byte, error) + func (pk *PublicKey) String() (string, error) + func (pk *PublicKey) ToStandardKey() crypto2.PublicKey + func (pk *PublicKey) Type() crypto.KeyType + func (pk *PublicKey) Verify(data []byte, sig []byte) (bool, error) + func (pk *PublicKey) VerifyWithOpts(data []byte, sig []byte, opts *crypto.SignOpts) (bool, error)