Versions in this module Expand all Collapse all v0 v0.1.9 Sep 18, 2022 v0.1.8 Sep 18, 2022 v0.1.7 Sep 18, 2022 Changes in this version + const CBC + const CFB + const ECB + const NoPadding + const PKCS5 + const PKCS7 + var ErrBadPadding = errors.New("pkcs7: bad padding") + var ErrEmpty = errors.New("pkcs7: the given byte slice is empty") + var ErrInvalidBlockSize = fmt.Errorf("pkcs7: invalid blocksize (valid sizes: b >= %d && b <= %d)", minBlockSize, ...) + var ErrNotFullBlocks = errors.New("pkcs7: input not full blocks") + func Md5(in []byte) string + func Md5Any(in ...any) string + func Md5_16(in []byte) string + func PadPKCS5(ciphertext []byte, blockSize int) []byte + func PadPKCS7(data []byte, blockSize int) ([]byte, error) + func UnpadPKCS5(origData []byte) []byte + func UnpadPKCS7(data []byte, blockSize int) ([]byte, error) + type AES struct + Encrypted []byte + Iv []byte + Mod int + Origin []byte + Padding int + func (aes *AES) Decrypt(cipher []byte) ([]byte, error) + func (aes *AES) DecryptedString() string + func (aes *AES) Encrypt(data []byte) ([]byte, error) + func (aes *AES) EncryptedBase64() string + func (aes *AES) EncryptedHex() string + func (aes *AES) IvGen() []byte + func (aes *AES) Key(keystr string, keylen int) + type MD5 struct + Data []byte + func (ctx *MD5) Upper() string + func (ctx *MD5) Upper16() string