Documentation
¶
Index ¶
- Variables
- func Base64URLSafe(text string) string
- func Decrypt(keyStr string, text string) (string, error)
- func DecryptECBMode(key, encrypted []byte) (decrypted []byte, err error)
- func Encrypt(keyStr string, text string) (string, error)
- func EncryptECBMode(key, plainText []byte) (encrypted []byte, err error)
- func HiDecrypt(base64Key string, base64Encrypted string) (decrypted string, err error)
- func HiEncrypt(base64Key string, plainText string) (base64Encrypted string, err error)
- func PKCS5Padding(plainText []byte, blockSize int) []byte
- func PKCS5UnPadding(plainText []byte, blockSize int) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeyLengthSixteen = errors.New("a sixteen or twenty-four or thirty-two length secret key is required") ErrPaddingSize = errors.New("padding size error please check the secret key or iv") ErrTextNotMultiBlockSize = errors.New("text size is not multi times of block size") )
各类错误
Functions ¶
func Base64URLSafe ¶
func DecryptECBMode ¶
DecryptECBMode AES128-ECB模式解密
func EncryptECBMode ¶
EncryptECBMode AES128-ECB模式加密
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.