evault-core 0.1.0

Core types, traits, and services for evault.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Cryptographic primitives and secret-handling types used across `evault`.
//!
//! - [`SecretString`] is a thin re-export of [`secrecy::SecretString`] so that
//!   callers do not need to depend on `secrecy` directly. It wipes its
//!   contents on drop and redacts in [`std::fmt::Debug`] output.
//! - [`MasterKey`] is a 256-bit random key used to unlock the encrypted
//!   metadata store ([`SqlCipherMetadataStore`](../../evault_store_sqlcipher)).
//!   It is generated by [`MasterKey::generate`] and zeroized on drop.

mod master_key;
mod secret;

pub use master_key::{MasterKey, MASTER_KEY_LEN};
pub use secret::{SecretBytes, SecretString};

/// Re-export of [`secrecy::ExposeSecret`] for convenience.
pub use secrecy::ExposeSecret;