Documentation
¶
Index ¶
- func AESEncryptCBC(origData []byte, key []byte) (encrypted []byte)
- func PKCS7Padding(originByte []byte, blockSize int) []byte
- func RSADecrypt(encrypt_text string, priv_key *rsa.PrivateKey) (plain_text string, err error)
- func RSADecryptFromBase64String(encrypt_text string, priv_key *rsa.PrivateKey) (plain_text string, err error)
- func RSADecryptFromHexString(encrypt_text string, priv_key *rsa.PrivateKey) (plain_text string, err error)
- func RSAEncrypt(plain_text string, pub_key *rsa.PublicKey) (encrypt_text string, err error)
- func RSAEncryptToBase64String(plain_text string, pub_key *rsa.PublicKey) (encrypt_text string, err error)
- func RSAEncryptToHexString(plain_text string, pub_key *rsa.PublicKey) (encrypt_text string, err error)
- func RSAReadPrivateKey(priv_key_string string) (priv_key *rsa.PrivateKey, err error)
- func RSAReadPublicKey(pub_key_string string) (pub_key *rsa.PublicKey, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESEncryptCBC ¶
func PKCS7Padding ¶
func RSADecrypt ¶
func RSADecrypt(encrypt_text string, priv_key *rsa.PrivateKey) (plain_text string, err error)
func RSADecryptFromBase64String ¶ added in v0.0.5
func RSADecryptFromBase64String(encrypt_text string, priv_key *rsa.PrivateKey) (plain_text string, err error)
func RSADecryptFromHexString ¶ added in v0.0.5
func RSADecryptFromHexString(encrypt_text string, priv_key *rsa.PrivateKey) (plain_text string, err error)
func RSAEncrypt ¶
func RSAEncryptToBase64String ¶ added in v0.0.5
func RSAEncryptToHexString ¶ added in v0.0.5
func RSAReadPrivateKey ¶
func RSAReadPrivateKey(priv_key_string string) (priv_key *rsa.PrivateKey, err error)
解析 string 为 rsa.PrivateKey 类型
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.