Documentation
¶
Index ¶
- func DecryptData(privateKey *rsa.PrivateKey, ciphertext string) ([]byte, error)
- func EncryptData(publicKey *rsa.PublicKey, data []byte) (string, error)
- func GenerateKey() (*rsa.PrivateKey, error)
- func PrivateKeyToString(privateKey *rsa.PrivateKey) (string, error)
- func PublicKeyToString(publicKey *rsa.PublicKey) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptData ¶
func DecryptData(privateKey *rsa.PrivateKey, ciphertext string) ([]byte, error)
DecryptData 解密数据
func EncryptData ¶
EncryptData 加密数据
func PrivateKeyToString ¶
func PrivateKeyToString(privateKey *rsa.PrivateKey) (string, error)
PrivateKeyToString 将RSA私钥转换为PEM格式的字符串
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.