Documentation
¶
Overview ¶
Package local implements an in-process symmetric kek.Wrapper using a cipher.Cipher (AES-256-GCM by default) and provides in-memory and file-based KEK loaders.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKeyringFromFiles ¶
func NewKeyringFromFiles(cfg FileConfig, opts ...Option) (kek.Keyring, error)
NewKeyringFromFiles reads base64-encoded keys from the configured file paths and returns a kek.Keyring.
Types ¶
type FileConfig ¶
type FileConfig struct {
// KeyPaths maps KEK IDs to file paths containing base64-encoded keys.
KeyPaths map[string]string
ActiveKeyID string
}
FileConfig holds the configuration for loading local KEKs from files.
type Option ¶
type Option func(*Wrapper)
Option configures a local Wrapper.
func WithCipher ¶
WithCipher overrides the default AES-256-GCM cipher used to wrap/unwrap DEKs.
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper implements kek.Wrapper in-process using a symmetric key and cipher.Cipher. Safe for concurrent use.
func NewWrapper ¶
NewWrapper creates an in-process KEK Wrapper with a defensive copy of rawKey.
func (*Wrapper) Close ¶
func (w *Wrapper) Close()
Close scrubs the local KEK bytes from memory and marks the wrapper as closed.