secured-enclave
Overview
secured-enclave is a Rust crate designed for secure and dev-ergonomic encryption and decryption of data. It provides a robust way to encrypt data using various cipher algorithms, key derivation strategies, and support for metadata.
Features
- Secure Encryption and Decryption: Uses ChaCha20Poly1305 for encryption and authentication, ensuring strong security.
- Metadata Support: Allows associating metadata with encrypted data.
- Flexible Key Management: Supports different key derivation strategies for enhanced security.
- Serialization and Deserialization: Easily serialize and deserialize encrypted data for storage or transmission.
Installation
Add the following line to your Cargo.toml file:
[]
= "0.5.0"
Usage
Basic Encryption and Decryption
Encrypting Data
use ;
let password = "strong_password";
let encrypted_string = "Hello, world!".encrypt;
Decrypting Data
use ;
let password = "strong_password";
let decrypted_result = encrypted_data.decrypt;
println!
Advanced Usage
Encrypting with Custom Strategies
It is possible to have more control as well when needed:
use ;
Decrypting with Metadata
use ;
let decryption_result = encrypted_data_with_metadata.;
match decryption_result
Testing
The crate includes a comprehensive set of unit tests. Run the tests with the following command:
cargo test
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
License
This project is licensed under the MIT license.
This README provides a basic guide to getting started with the Enclave crate. For more detailed documentation, please refer to the API documentation.