symmetric

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AesGCM

type AesGCM struct {
	AdditionalData []byte
}

func (*AesGCM) Decrypt

func (a *AesGCM) Decrypt(key, ciphertext []byte) ([]byte, error)

func (*AesGCM) Encrypt

func (a *AesGCM) Encrypt(key, payload []byte) ([]byte, error)

type Symmetric

type Symmetric interface {
	Encrypt([]byte, []byte) ([]byte, error)
	Decrypt([]byte, []byte) ([]byte, error)
}

type SymmetricStream

type SymmetricStream interface {
	Encrypt(io.Reader, io.Writer) error
	Decrypt(io.Reader, io.Writer) error
}

type XChaCha20

type XChaCha20 struct {
	AdditionalData []byte
}

func (*XChaCha20) Decrypt

func (x *XChaCha20) Decrypt(key, ciphertext []byte) ([]byte, error)

func (*XChaCha20) Encrypt

func (x *XChaCha20) Encrypt(key, plaintext []byte) ([]byte, error)

XChaCha20-Poly1305.

type XChaCha20Stream

type XChaCha20Stream struct {
	Key  []byte
	Hash func() hash.Hash
}

func (*XChaCha20Stream) Decrypt

func (x *XChaCha20Stream) Decrypt(in io.Reader, out io.Writer) error

func (*XChaCha20Stream) Encrypt

func (x *XChaCha20Stream) Encrypt(in io.Reader, out io.Writer) error

XChaCha20-Poly1305 Age Stream.

type Xor

type Xor struct{}

func (*Xor) Decrypt

func (x *Xor) Decrypt(key, payload []byte) ([]byte, error)

func (*Xor) Encrypt

func (x *Xor) Encrypt(key, payload []byte) ([]byte, error)

XOR.

Jump to

Keyboard shortcuts

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