Documentation ¶
Index ¶
- Constants
- func New(keyType crypto.KeyType) (crypto.PrivateKey, error)
- func NewDecryptionKey(keyType crypto.KeyType) (crypto.DecryptKey, error)
- type 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
- 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)
Constants ¶
View Source
const ( RSA_OAEP = "OAEP" RSA_PKCS1 = "PKCS1" RSA_PSS = "PSS" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PrivateKey ¶
type PrivateKey struct { K *rsa.PrivateKey // contains filtered or unexported fields }
func (*PrivateKey) Bytes ¶
func (sk *PrivateKey) Bytes() ([]byte, error)
func (*PrivateKey) Decrypt ¶
func (sk *PrivateKey) Decrypt(ciphertext []byte) ([]byte, error)
func (*PrivateKey) DecryptWithOpts ¶
func (*PrivateKey) EncryptKey ¶
func (sk *PrivateKey) EncryptKey() crypto.EncryptKey
func (*PrivateKey) PublicKey ¶
func (sk *PrivateKey) PublicKey() crypto.PublicKey
func (*PrivateKey) Sign ¶
func (sk *PrivateKey) Sign(data []byte) ([]byte, error)
func (*PrivateKey) SignWithOpts ¶
func (*PrivateKey) String ¶
func (sk *PrivateKey) String() (string, error)
func (*PrivateKey) ToStandardKey ¶
func (sk *PrivateKey) ToStandardKey() crypto2.PrivateKey
func (*PrivateKey) Type ¶
func (sk *PrivateKey) Type() crypto.KeyType
Click to show internal directories.
Click to hide internal directories.