Store secrets and sensitive data in encrypted vaults using the Tauri v2 stronghold plugin with snapshot management. Use when securing API keys, tokens, or credentials on disk, managing encrypted snapshots, or pairing with biometric authentication.
ALWAYS use this skill when the user mentions:
Trigger phrases include:
cargo add tauri-plugin-stronghold
tauri::Builder::default()
.plugin(tauri_plugin_stronghold::Builder::new(|password| {
// Hash the password for vault encryption
argon2::hash_raw(password.as_bytes(), b"salt", &argon2::Config::default()).unwrap()
}).build())
src-tauri/capabilities/default.json:
{ "permissions": ["stronghold:default"] }
import { Stronghold } from '@tauri-apps/plugin-stronghold';
const stronghold = await Stronghold.load('vault.hold', 'user-password');
const client = await stronghold.loadClient('main');
const store = client.getStore();
await store.insert('api-key', Array.from(new TextEncoder().encode('sk-12345')));
const value = await store.get('api-key');
tauri stronghold, encrypted storage, secrets, vault, credentials, secure storage