# Security: Vault
- [Introduction](#introduction)
- [Storing Items](#storing-items)
- [Retrieving Items](#retrieving-items)
- [Removing Items](#removing-items)
## Introduction
The `Vault` facade provides a simple interface for securely storing sensitive data on the device. It uses the platform's native secure storage mechanisms:
- **iOS**: Keychain
- **Android**: EncryptedSharedPreferences
- **macOS**: Keychain
- **Windows**: Windows Credential Locker
## Storing Items
To store a value in the vault:
```dart
await Vault.put('api_token', 'super-secret-token');
```
## Retrieving Items
To retrieve a value:
```dart
final token = await Vault.get('api_token');
if (token != null) {
// Use token...
}
```
## Removing Items
To remove a specific item:
```dart
await Vault.delete('api_token');
```
To wipe all data from the vault (use with caution):
```dart
await Vault.flush();
```