Documentation ¶
Index ¶
- func AesDecrypt(cipherText string, key []byte, iv []byte) ([]byte, error)
- func AesEncrypt(plainText []byte, key []byte, iv []byte) (string, error)
- func ComparePasswords(hashedPwd string, plainPwd string) bool
- func EncryptPassword(pwd string) string
- func GenerateAesIV(blockSize int) string
- func MD5(s string) string
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
AES解密函数,使用CBC模式和PKCS7填充
func AesEncrypt ¶
AES加密函数,使用CBC模式和PKCS7填充
func ComparePasswords ¶
func EncryptPassword ¶
func GenerateAesIV ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.