Documentation ¶
Index ¶
- type Cipher
- type CipherMode
- type Key
- func LoadKeyFromDerFile(publicKeyFilePath, privateKeyFilePath string, ...) (Key, error)
- func LoadKeyFromPEMByte(pukBytes, prkBytes []byte, ParseKey func([]byte, []byte) (Key, error)) (Key, error)
- func LoadKeyFromPEMFile(publicKeyFilePath, privateKeyFilePath string, ...) (Key, error)
- func ParsePKCS1Key(publicKey, privateKey []byte) (Key, error)
- func ParsePKCS1KeyByCert(publicKey, privateKey []byte) (Key, error)
- func ParsePKCS8Key(publicKey, privateKey []byte) (Key, error)
- type Padding
- type SignMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cipher ¶
type CipherMode ¶
type CipherMode interface { Encrypt(plainText []byte, puk *rsa.PublicKey) ([]byte, error) Decrypt(cipherText []byte, prk *rsa.PrivateKey) ([]byte, error) }
func NewOAEPCipher ¶
func NewOAEPCipher() CipherMode
func NewPKCS1v15Cipher ¶
func NewPKCS1v15Cipher() CipherMode
type Key ¶
type Key interface { PublicKey() *rsa.PublicKey PrivateKey() *rsa.PrivateKey Modulus() int }
func LoadKeyFromDerFile ¶
func LoadKeyFromPEMByte ¶
func LoadKeyFromPEMByte(pukBytes, prkBytes []byte, ParseKey func([]byte, []byte) (Key, error)) (Key, error)
Eason Lin
func LoadKeyFromPEMFile ¶
func ParsePKCS1Key ¶
func ParsePKCS1KeyByCert ¶
func ParsePKCS8Key ¶
Click to show internal directories.
Click to hide internal directories.