Documentation
¶
Index ¶
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func HamSha1(data string, key []byte) string
- func Md5(msg string) string
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func Sha1(msg string) string
- func Sha256(msg string) string
- func ZeroPadding(ciphertext []byte, blockSize int) []byte
- func ZeroUnPadding(origData []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
AES-128。key长度:16, 24, 32 bytes 对应 AES-128, AES-192, AES-256
func AesEncrypt ¶
AES-128。key长度:16, 24, 32 bytes 对应 AES-128, AES-192, AES-256 返回的是 []byte 要做一步转换成string base64.StdEncoding.EncodeToString(result)
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func ZeroPadding ¶
func ZeroUnPadding ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.