Skip to main content

resolve_key

Function resolve_key 

Source
pub fn resolve_key() -> Result<SecretString, String>
Expand description

Resolve the secret key, checking in order:

  1. MURK_KEY env var (explicit key)
  2. MURK_KEY_FILE env var (path to key file)
  3. ~/.config/murk/keys/<vault-hash> (automatic lookup for default vault)
  4. .env file in cwd (backward compat)

Returns the key wrapped in SecretString so it is zeroized on drop.