Documentation
¶
Overview ¶
Package secrets provides password-encrypted storage for sensitive data (e.g. Chrome cookies, API tokens). Data is encrypted at rest with AES-256-GCM using an Argon2id-derived key. The plaintext never touches disk or shell history — passwords are read via raw terminal I/O.
Storage layout: ~/.revoco/secrets.json
{
"salt": "<base64>", // 16-byte Argon2id salt
"nonce": "<base64>", // 12-byte GCM nonce
"data": "<base64>" // AES-256-GCM ciphertext (JSON payload)
}
Index ¶
- func DefaultPath() (string, error)
- func Delete(path, password, key string) error
- func Encrypt(path string, password string, payload Payload) error
- func Exists(path string) bool
- func Get(path, password, key string) (string, error)
- func PromptPassword(prompt string) (string, error)
- func Store(path, password, key, value string) error
- type Payload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encrypt ¶
Encrypt serialises payload as JSON, encrypts it with AES-256-GCM keyed by password, and writes the envelope to path.
func PromptPassword ¶
PromptPassword reads a password from the terminal without echo. It uses raw terminal mode so the password never appears in shell history or process listings.
Types ¶
Click to show internal directories.
Click to hide internal directories.