pub struct EncryptionManager { /* private fields */ }Implementations§
Source§impl EncryptionManager
impl EncryptionManager
pub fn new( config: EncryptionConfig, provider: Box<dyn EncryptionProvider>, ) -> Result<Self>
pub fn from_config(config: EncryptionConfig) -> Result<Self>
pub fn disabled() -> Self
pub fn encrypt(&self, plaintext: &[u8], password: &str) -> Result<Vec<u8>>
pub fn decrypt(&self, ciphertext: &[u8], password: &str) -> Result<Vec<u8>>
pub fn is_enabled(&self) -> bool
pub fn config(&self) -> &EncryptionConfig
Auto Trait Implementations§
impl Freeze for EncryptionManager
impl !RefUnwindSafe for EncryptionManager
impl Send for EncryptionManager
impl Sync for EncryptionManager
impl Unpin for EncryptionManager
impl UnsafeUnpin for EncryptionManager
impl !UnwindSafe for EncryptionManager
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