sifredb-derive
Derive macros for SifreDB - automatic field-level encryption.
Features
- Automatic encryption/decryption of struct fields
- Custom attribute configuration
- Type-safe encryption contexts
- Compile-time validation
Installation
Add this to your Cargo.toml:
[]
= "0.1"
= "0.1"
Usage
use Encrypt;
use *;
The derive macro automatically generates encryption and decryption methods for annotated fields.
Attributes
#[encrypt]- Mark field for encryption#[encrypt(deterministic)]- Use deterministic encryption for equality queries#[encrypt(context = "custom")]- Specify custom encryption context
Related Crates
- sifredb: Core encryption library
- sifredb-key-file: File-based key provider
- sifredb-kms-aws: AWS KMS integration
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.