Documentation
¶
Index ¶
- func AESDecrypt(encrypted, key []byte) ([]byte, error)
- func AESEncrypt(plaintext []byte, key []byte) ([]byte, error)
- func GenerateRsaKey(len int) (string, string, error)
- func MD5(data []byte) string
- func MD5File(filename string) string
- func ParsePrivateKey(privateKeyStr string) (*rsa.PrivateKey, error)
- func ParsePublicKey(publicKeyStr string) (*rsa.PublicKey, error)
- func PrivateKeyToString(privateKey *rsa.PrivateKey) (string, error)
- func PublicKeyToString(publicKey *rsa.PublicKey) (string, error)
- func RSADecrypt(encryptedMsg, priKey string) (string, error)
- func RSAEncrypt(message, pubKey string) (string, error)
- func SHA256(data []byte) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESDecrypt ¶
func ParsePrivateKey ¶
func ParsePrivateKey(privateKeyStr string) (*rsa.PrivateKey, error)
将字符串转换为RSA私钥
func PrivateKeyToString ¶
func PrivateKeyToString(privateKey *rsa.PrivateKey) (string, error)
func RSADecrypt ¶
func RSAEncrypt ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.