cipher

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package cipher defines the symmetric encryption interface used throughout the encryption library. Implementations must be safe for concurrent use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cipher

type Cipher interface {
	// Encrypt encrypts plaintext and returns ciphertext.
	// The ciphertext format is implementation-defined (e.g., nonce + ciphertext + tag).
	Encrypt(key, plaintext []byte) ([]byte, error)

	// Decrypt decrypts ciphertext and returns plaintext.
	Decrypt(key, ciphertext []byte) ([]byte, error)

	// KeySize returns the required key size in bytes.
	KeySize() int
}

Cipher performs symmetric encryption and decryption. Implementations must be safe for concurrent use.

Directories

Path Synopsis
Package aesgcm provides an AES-256-GCM implementation of the cipher.Cipher interface.
Package aesgcm provides an AES-256-GCM implementation of the cipher.Cipher interface.

Jump to

Keyboard shortcuts

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