package local¶
Constants¶
Functions¶
func Types¶
Types¶
type EnvKey¶
EnvKey uses AES-256-GCM with a 32 byte symmetric key read from a named environment variable. The env value must be the base64-encoded key.
func NewEnvKey¶
NewEnvKey reads the env var, decodes the key, and returns an EnvKey encrypter. Errors when the env var is unset, not base64, or does not decode to 32 bytes.
func (*EnvKey) Decrypt¶
Decrypt opens a value produced by Encrypt. Errors on tampered or truncated bytes.
func (*EnvKey) Describe¶
Describe names the env-key source and the env var the key is read from.
func (*EnvKey) Encrypt¶
Encrypt seals plaintext with a fresh random nonce. Output bytes are `nonce || ciphertext+tag`.
type EnvKeyConfig¶
type Noop¶
Noop passes bytes through unchanged. Useful in tests and for dev workflows where the operator has explicitly opted out of encryption.
func (Noop) Decrypt¶
func (Noop) Describe¶
Describe names the noop key source. The empty Config marks the sealed body as plaintext with nothing more to configure.