| Crates.io | windows-dpapi |
| lib.rs | windows-dpapi |
| version | 0.1.0 |
| created_at | 2025-05-20 06:11:18.64702+00 |
| updated_at | 2025-05-20 06:11:18.64702+00 |
| description | Safe Rust wrapper around Windows DPAPI using machine scope encryption. Ideal for RMM agents and headless system tools. |
| homepage | https://github.com/sheridans/windows-dpapi |
| repository | https://github.com/sheridans/windows-dpapi |
| max_upload_size | |
| id | 1680836 |
| size | 28,309 |
Safe Rust wrapper for Windows DPAPI (Data Protection API), supporting both user and machine scope encryption.
Scope::User and Scope::Machine supportAdd this to your Cargo.toml:
[dependencies]
windows-dpapi = "0.1.0"
Basic usage:
use windows_dpapi::{encrypt_data, decrypt_data, Scope};
fn main() -> anyhow::Result<()> {
let secret = b"my secret";
let encrypted = encrypt_data(secret, Scope::User)?;
let decrypted = decrypt_data(&encrypted, Scope::User)?;
assert_eq!(secret, decrypted.as_slice());
Ok(())
}
This project is licensed under either of the following, at your option:
Contributions are welcome! Please feel free to submit a Pull Request.