xor

package
v2.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package xor encrypts/decrypts Agent messages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encrypter

type Encrypter struct {
}

Encrypter is the structure that implements the Transformer interface for XOR encrypting/decryption

func NewEncrypter

func NewEncrypter() *Encrypter

NewEncrypter is a factory to return a structure that implements the Transformer interface

func (*Encrypter) Construct

func (e *Encrypter) Construct(data any, key []byte) ([]byte, error)

Construct takes data in data, AES encrypts it with the provided key, and returns that data as bytes

func (*Encrypter) Deconstruct

func (e *Encrypter) Deconstruct(data, key []byte) (any, error)

Deconstruct takes in AES encrypted data, decrypts it with the provided key, and returns the data as bytes

func (*Encrypter) String

func (e *Encrypter) String() string

String returns the name of the encrypter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL