Versions in this module Expand all Collapse all v0 v0.0.4 Nov 20, 2024 v0.0.3 Nov 21, 2024 Changes in this version + func Compress(data []byte) ([]byte, error) + func Decompress(compressedData []byte) ([]byte, error) + func PKCS7Pad(data []byte, blockSize int) []byte + type AesCtrEncryptor struct + func NewAesCtrEncryptor(key [32]byte, iv [16]byte) (*AesCtrEncryptor, error) + func (e *AesCtrEncryptor) Decrypt(reader io.Reader, writer io.Writer) error + func (e *AesCtrEncryptor) Encrypt(reader io.Reader, writer io.Writer) error + func (e *AesCtrEncryptor) Reset() error + type CryptoConn struct + func NewCryptoConn(conn net.Conn, cryptor Cryptor) *CryptoConn + func (sc *CryptoConn) Read(data []byte) (int, error) + func (sc *CryptoConn) Write(data []byte) (int, error) + type Cryptor interface + Decrypt func(reader io.Reader, writer io.Writer) error + Encrypt func(reader io.Reader, writer io.Writer) error + Reset func() error + func NewCryptor(name string, key, secret []byte) (Cryptor, error) + type XorEncryptor struct + func NewXorEncryptor(key []byte, iv []byte) *XorEncryptor + func (e *XorEncryptor) Decrypt(reader io.Reader, writer io.Writer) error + func (e *XorEncryptor) Encrypt(reader io.Reader, writer io.Writer) error + func (e *XorEncryptor) Reset() error