encryption

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInitializationFailed   = errors.New("initialization failed")
	ErrEncryptionFailed       = errors.New("encryption failed")
	ErrDecryptionFailed       = errors.New("decryption failed")
	ErrCiphertextTooLarge     = errors.New("ciphertext too large")
	ErrInvalidSaltNonceLength = errors.New("invalid salt/nonce length")
	ErrBadMagic               = errors.New("bad magic")
	ErrUnsupportedVersion     = errors.New("unsupported version")
)

Functions

This section is empty.

Types

type AES256GCMService

type AES256GCMService struct {
	// contains filtered or unexported fields
}

AES256GCMService implements AES-256-GCM encryption.

func NewAES256GCMService

func NewAES256GCMService(masterKey []byte) *AES256GCMService

NewAES256GCMService creates a new AES-256-GCM encryption service.

func (*AES256GCMService) Decrypt

func (s *AES256GCMService) Decrypt(ctx context.Context, in io.Reader, out io.Writer) error

Decrypt decrypts a stream using AES-256-GCM with streaming support.

func (*AES256GCMService) Encrypt

func (s *AES256GCMService) Encrypt(ctx context.Context, in io.Reader, out io.Writer) error

Encrypt encrypts a stream using AES-256-GCM with streaming support.

type Service added in v0.5.1

type Service interface {
	// Encrypt encrypts a stream using AES-256-GCM with streaming support
	Encrypt(ctx context.Context, r io.Reader, w io.Writer) error
	// Decrypt decrypts a stream using AES-256-GCM with streaming support
	Decrypt(ctx context.Context, r io.Reader, w io.Writer) error
}

Service defines the interface for encryption operations.

Jump to

Keyboard shortcuts

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