Documentation
¶
Overview ¶
Package crypto provides AES-256-GCM encryption with versioned keys for rotation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encryptor ¶
type Encryptor struct {
// contains filtered or unexported fields
}
Encryptor encrypts and decrypts data using AES-256-GCM with versioned keys. The version byte prefix allows decryption with old keys during rotation.
func New ¶
New creates an Encryptor. currentKey is the active encryption key (32 bytes for AES-256). oldKeys are previous keys that can still decrypt but won't be used for new encryptions. Panics if any key is not exactly 32 bytes.
Click to show internal directories.
Click to hide internal directories.