cipher

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package cipher defines the authenticated symmetric encryption interface (AEAD) 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 cryptographically binds it to aad
	// (Additional Authenticated Data).
	// The ciphertext format is implementation-defined (e.g., nonce + ciphertext + tag).
	Encrypt(key, plaintext, aad []byte) ([]byte, error)

	// Decrypt decrypts ciphertext and verifies aad.
	Decrypt(key, ciphertext, aad []byte) ([]byte, error)

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

Cipher performs authenticated symmetric encryption and decryption (AEAD). 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