| Crates.io | secure-vault |
| lib.rs | secure-vault |
| version | 0.1.2 |
| created_at | 2025-11-23 00:08:44.949152+00 |
| updated_at | 2025-11-23 00:22:12.595294+00 |
| description | A secure memory vault that protects sensitive data from memory dumps and swap disk attacks |
| homepage | |
| repository | https://github.com/Pick999999/secure-vault |
| max_upload_size | |
| id | 1945896 |
| size | 7,813 |
A simple Rust crate for protecting sensitive data in memory. Perfect for API keys, tokens, and passwords.
[dependencies]
secure-vault = "0.1.1"
use secure_vault::{protect, SecureVault};
fn main() {
// Protect secrets with one line
protect! {
let api_key = "sk_live_123456789";
let db_password = "super_secret";
}
// Use securely
api_key.with_secure(|key| {
println!("API Key: {}...", &key[..10]);
});
}
Features
🛡️ Simple macro-based protection
🔒 Safe debug output
📦 Zero dependencies
🚀 Production ready
Usage Examples
Ferrariv API
Web App Secrets
rust
protect! {
let database_url = "postgres://user:pass@localhost/db";
let jwt_secret = "jwt_signing_key";
}
database_url.with_secure(|url| {
connect_to_database(url);
});
Why Secure Vault?
Prevents accidental logging of secrets
Hides data in debug output
Simple API - no complex setup
Perfect for financial apps, APIs, and web services
License
MIT OR Apache-2.0
text
**แค่นี้พอครับ!** Copy ไปวางในไฟล์ `README.md` แล้วรัน:
```bash
cargo publish
ได้เลย 🚀