Documentation ¶
Overview ¶
*
- @Author: DollarKiller
- @Description: str 压缩
- @Github: https://github.com/dollarkillerx
- @Date: Create in 14:30 2019-10-29
*
- @Author: DollarKiller
- @Description: 加密
- @Github: https://github.com/dollarkillerx
- @Date: Create in 14:19 2019-10-29
*
- @Author: DollarKiller
- @Description: 随机
- @Github: https://github.com/dollarkillerx
- @Date: Create in 14:24 2019-10-29
Index ¶
- func AESDecrypt(key []byte, ciphertext []byte) ([]byte, bool)
- func AESEncrypt(key []byte, plaintext []byte) ([]byte, bool)
- func Base64Decode(s string) ([]byte, error)
- func Base64Encode(data []byte) string
- func Base64URLDecode(s string) ([]byte, error)
- func Base64URLEncode(data []byte) string
- func GenRsaKey(bits int) (e error, priKey string, pubKey string)
- func Md5Encode(str string) string
- func RsaDecrypt(ciphertext, privateKey []byte) ([]byte, error)
- func RsaDecryptSimple(ciphertext, privateKey string) (string, error)
- func RsaEncrypt(origData, pubKey []byte) ([]byte, error)
- func RsaEncryptSimple(origData, pubKey string) (string, error)
- func RsaSign(data, prvKey []byte) ([]byte, error)
- func RsaSignSimple(data, prvKey string) (string, error)
- func RsaSignVer(data, signature, publicKey []byte) error
- func RsaSignVerSimple(data, signature, publicKey string) error
- func Sha1Encode(str string) string
- func Sha256Encode(str string) string
- func SuperRand() string
- type StrZip
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESDecrypt ¶ added in v0.0.25
Decrypt from base64 to decrypted string
func AESEncrypt ¶ added in v0.0.25
对称加密 AES 高级标准加密 Encrypt string to base64 crypto using AES
func RsaDecrypt ¶
Rsa256 解密 @params: ciphertext 加密数据 @Params: prvKey 私钥
func RsaDecryptSimple ¶
Rsa256 解密简单
func RsaEncrypt ¶
Rsa256 加密 @params: origData 原始数据 @Params: pubKey 公钥
func RsaEncryptSimple ¶
Rsa256 加密简单 @params: origData 原始数据 @Params: pubKey 公钥
func RsaSignSimple ¶
Rsa256 签名简单 @params: origData 需要签名的数据 @Params: prvKey 私钥
func RsaSignVer ¶
Rsa256 验签 @params: data 原始数据 @params: signature 签名 @params: publicKey 公钥
func RsaSignVerSimple ¶
Rsa256 验签简单 @params: data 原始数据 @params: signature 签名 @params: publicKey 公钥
Types ¶
Click to show internal directories.
Click to hide internal directories.