Skip to main content

write_secret_file

Function write_secret_file 

Source
pub fn write_secret_file(path: &Path, content: &[u8]) -> Result<()>
Expand description

Write content to a file with owner-only permissions (0600 on Unix).

Use this for any file containing sensitive data: tokens, secrets, credentials, encryption keys, or other material that should not be world-readable.