Documentation ¶
Index ¶
- func FormatPrivateKey(raw string) (result []byte)
- func FormatPublicKey(raw string) (result []byte)
- func ParsePKCS1PrivateKey(data []byte) (key *rsa.PrivateKey, err error)
- func ParsePKCS1PublicKey(data []byte) (key *rsa.PublicKey, err error)
- func RSADecryptPKCS1(ciphertext, key []byte) ([]byte, error)
- func RSADecryptPKCS1WithKey(ciphertext []byte, key *rsa.PrivateKey) ([]byte, error)
- func RSAEncryptPKCS1(plaintext, key []byte) ([]byte, error)
- func RSAEncryptPKCS1WithKey(plaintext []byte, key *rsa.PublicKey) ([]byte, error)
- func SignPKCS1v15(src, key []byte, hash crypto.Hash) ([]byte, error)
- func SignPKCS1v15WithKey(src []byte, key *rsa.PrivateKey, hash crypto.Hash) ([]byte, error)
- func VerifyPKCS1v15(src, sig, key []byte, hash crypto.Hash) error
- func VerifyPKCS1v15WithKey(src, sig []byte, key *rsa.PublicKey, hash crypto.Hash) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatPrivateKey ¶
func FormatPublicKey ¶
func ParsePKCS1PrivateKey ¶
func ParsePKCS1PrivateKey(data []byte) (key *rsa.PrivateKey, err error)
func RSADecryptPKCS1 ¶
func RSADecryptPKCS1WithKey ¶
func RSADecryptPKCS1WithKey(ciphertext []byte, key *rsa.PrivateKey) ([]byte, error)
func RSAEncryptPKCS1 ¶
func RSAEncryptPKCS1WithKey ¶
func SignPKCS1v15WithKey ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.