Versions in this module Expand all Collapse all v1 v1.0.3 Dec 21, 2023 Changes in this version + const AES128KeyLen + const ChaCha20KeyLen + const ChaCha20NonceLen + const CryptoAES128 + const CryptoChaCha20 + const CryptoNone + const CryptoTea + const NoneKeyLen + const TeaByteKeyLen + const TeaKeyLen + func AesDecrypt(crypted, key []byte) ([]byte, error) + func AesEncrypt(origData, key []byte) ([]byte, error) + func PKCS5Padding(ciphertext []byte, blockSize int) []byte + func PKCS5UnPadding(origData []byte) []byte + func TeaDecrypt(src, teaKey []byte, key uint32) + func TeaEncrypt(src, teaKey []byte, key uint32) + type CryptoType uint8 + func CryptoFromString(method string) CryptoType + type Cryptor struct + func NewCryptor() *Cryptor + func (c *Cryptor) Decrypt(cryptoCode CryptoType, isOrderStream bool, src []byte, keys ...[]byte) ([]byte, error) + func (c *Cryptor) Encrypt(cryptoCode CryptoType, isOrderStream bool, src []byte, keys ...[]byte) ([]byte, error)