pub struct EncryptedCachePersistence { /* private fields */ }Expand description
Encrypted cache persistence using ChaCha20-Poly1305
Wraps the standard CachePersistence with at-rest encryption using a key derived from the HostIdentity (see ADR-007).
Implementations§
Source§impl EncryptedCachePersistence
impl EncryptedCachePersistence
Sourcepub fn new(
cache_dir: &Path,
enable_locking: bool,
encryption_key: [u8; 32],
) -> Result<Self>
pub fn new( cache_dir: &Path, enable_locking: bool, encryption_key: [u8; 32], ) -> Result<Self>
Create new encrypted persistence layer
§Arguments
cache_dir- Directory for cache filesenable_locking- Whether to use file locking for coordinationencryption_key- 32-byte key from HostIdentity::derive_cache_key()
Trait Implementations§
Source§impl Drop for EncryptedCachePersistence
impl Drop for EncryptedCachePersistence
Auto Trait Implementations§
impl Freeze for EncryptedCachePersistence
impl RefUnwindSafe for EncryptedCachePersistence
impl Send for EncryptedCachePersistence
impl Sync for EncryptedCachePersistence
impl Unpin for EncryptedCachePersistence
impl UnsafeUnpin for EncryptedCachePersistence
impl UnwindSafe for EncryptedCachePersistence
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more