Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compress ¶
Compress compresses the input data using Snappy and returns the compressed data or an error.
func Decompress ¶
Decompress decompresses the input Snappy-compressed data and returns the original data or an error.
Types ¶
type AesCtrEncryptor ¶
type AesCtrEncryptor struct {
// contains filtered or unexported fields
}
AesCtrEncryptor struct holding key, iv, and separate streams for encryption and decryption
func NewAesCtrEncryptor ¶
func NewAesCtrEncryptor(key [32]byte, iv [16]byte) (*AesCtrEncryptor, error)
NewAesCtrEncryptor creates a new instance of AesCtrEncryptor
func (*AesCtrEncryptor) Reset ¶
func (e *AesCtrEncryptor) Reset() error
Reset reinitializes the encrypt and decrypt streams
type CryptoConn ¶
func NewCryptoConn ¶
func NewCryptoConn(conn net.Conn, cryptor Cryptor) *CryptoConn
type Cryptor ¶
type XorEncryptor ¶
type XorEncryptor struct {
// contains filtered or unexported fields
}
XorEncryptor struct holding key, iv, and separate counters for encryption and decryption
func NewXorEncryptor ¶
func NewXorEncryptor(key []byte, iv []byte) *XorEncryptor
NewXorEncryptor creates a new instance of XorEncryptor
func (*XorEncryptor) Decrypt ¶
Decrypt reads data from reader, applies XOR decryption, and writes it to writer
func (*XorEncryptor) Encrypt ¶
Encrypt reads data from reader, applies XOR encryption, and writes it to writer
func (*XorEncryptor) Reset ¶
func (e *XorEncryptor) Reset() error
Reset resets both the encryption and decryption counters