Documentation
¶
Overview ¶
Package instancekey loads persistent instance secrets and derives purpose-specific keys.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
Key holds a 32-byte instance secret. Use DeriveKey rather than sharing the secret.
func LoadOrCreate ¶
LoadOrCreate reads an existing key or atomically installs a fully written new key. The file contains a version, a 32-byte secret and a checksum to detect corruption. Existing files are never replaced, including malformed or unreadable files.