vios_app 0.1.1

Small JSON vaults: Argon2id + AES-GCM, with optional AAD binding.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::vault::vault_structs::VaultPayload;
use std::fs::File;
use std::io::Write;
use std::path::Path;

pub fn save_vault_components(payload: &VaultPayload, path: &Path) -> std::io::Result<()> {
    let json = serde_json::to_string_pretty(payload).unwrap();
    let mut file = File::create(path)?;
    file.write_all(json.as_bytes())?;
    Ok(())
}