Documentation
¶
Overview ¶
Package secret encrypts small secrets (service keys, plugin keys, storage credentials) before they are stored, with AES-256-GCM.
The key comes from PANELARR_SECRET_KEY (base64 of 32 bytes) or, when that isn't set, from a key file in the server's config directory, generated on first use. Keep the key with your database backups: without it, stored passwords can't be read back.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Box ¶
type Box struct {
// contains filtered or unexported fields
}
Box seals and opens secrets. It loads its key on first use, so the server runs fine without a key until a secret has to be stored.
func NewBox ¶
NewBox returns a box whose key is envKey (base64) when set, otherwise the key in keyFile, created when missing.
Click to show internal directories.
Click to hide internal directories.