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.
Click to show internal directories.
Click to hide internal directories.