Documentation
¶
Index ¶
- Constants
- Variables
- func AESCBCEncrypt(plaintext []byte) (string, error)
- func AESCommonDecrypt(ciphertext string, key []byte, blockSize int, mode cipher.BlockMode) (string, error)
- func AESCommonEncrypt(plaintext, key []byte, blockSize int, mode cipher.BlockMode) (string, error)
- func CreateSign(args ...string) string
- func PKCS7Padding(data []byte, blockSize int) []byte
- func PKCS7Unpadding(data []byte) ([]byte, error)
- func SendMail(to, subject, body string)
- type AESECBPKCS5Padding
- type HttpClient
Constants ¶
View Source
const ( SignSuffix = "3478cbbc33f84bd00d75d7dfa69e0daa" MoGuKEY = "23DbtQHR2UMbH6mJ" )
常量定义
Variables ¶
View Source
var CXKEY = []byte("u2oh6Vu^HWe4_AES")
Functions ¶
func AESCBCEncrypt ¶
AESCBCEncrypt 使用 AES CBC 模式加密
func AESCommonDecrypt ¶
func AESCommonDecrypt(ciphertext string, key []byte, blockSize int, mode cipher.BlockMode) (string, error)
AESCommonDecrypt 使用 AES 解密(通用方法)
func AESCommonEncrypt ¶
AESCommonEncrypt 使用 AES 加密(通用方法)
func PKCS7Padding ¶
PKCS7Padding 对数据进行填充,使其长度对齐到块大小的倍数
Types ¶
type AESECBPKCS5Padding ¶
type AESECBPKCS5Padding struct {
// contains filtered or unexported fields
}
AESECBPKCS5Padding 封装的 AES-ECB 加密器
func NewAESECBPKCS5Padding ¶
func NewAESECBPKCS5Padding(key string, outFormat string) (*AESECBPKCS5Padding, error)
NewAESECBPKCS5Padding 创建一个 AES-ECB 加密器实例
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
HttpClient 是一个可定制的 HTTP 客户端,用于发送请求
Click to show internal directories.
Click to hide internal directories.