Versions in this module Expand all Collapse all v1 v1.0.6 Jun 12, 2023 Changes in this version + func GenerateKey(opt AlgorithmType, key []byte) (crypto.SymmetricKey, error) + func PKCS5Padding(ciphertext []byte, blockSize int) []byte + func PKCS5UnPadding(origData []byte) ([]byte, error) + func TripleDesDec(key, src []byte) ([]byte, error) + func TripleDesEnc(key, src []byte) ([]byte, error) + type AESKey struct + func (ek *AESKey) Bytes() ([]byte, error) + func (ek *AESKey) Decrypt(crypted []byte) ([]byte, error) + func (ek *AESKey) Encrypt(plain []byte) ([]byte, error) + type AlgorithmType int32 + const AES + const ThirdDES + type ThirdDESKey struct + func (ea *ThirdDESKey) Bytes() ([]byte, error) + func (ea *ThirdDESKey) Decrypt(cipherTex []byte) (plaintext []byte, err error) + func (ea *ThirdDESKey) Encrypt(plain []byte) (cipher []byte, err error)