Documentation
¶
Overview ¶
Package crypto encrypts credentials (indexer API keys, download client passwords, VPN configs) at rest in the SQLite DB.
The encryption key lives in a separate file (secret.key, 0600) next to app.db, generated on first run — so the DB file alone is not sufficient to decrypt stored credentials.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateKeyFile ¶
ValidateKeyFile reports whether data is a well-formed secret.key file (exactly what LoadOrCreateKey would accept), without keeping the key.
Types ¶
type Box ¶
type Box struct {
// contains filtered or unexported fields
}
Box encrypts/decrypts values with a fixed key loaded from disk.
func LoadOrCreateKey ¶
LoadOrCreateKey reads the encryption key from path, generating and persisting a new random one (0600) if it doesn't exist yet.