pub struct EncAlgo<T> { /* private fields */ }Expand description
Struct to represent an object to encrypt data with some encryption algorithm.
Implementations§
Trait Implementations§
Source§impl<CiAlgo> EncryptorBase<CiAlgo> for EncAlgo<CiAlgo>where
CiAlgo: AeadInPlace,
impl<CiAlgo> EncryptorBase<CiAlgo> for EncAlgo<CiAlgo>where
CiAlgo: AeadInPlace,
fn get_encryptor(&self) -> &CiAlgo
Source§fn encrypt(&self, data: &[u8]) -> Result<Vec<u8>>
fn encrypt(&self, data: &[u8]) -> Result<Vec<u8>>
Encrypt data without changing the original data.
Source§fn decrypt(&self, data: &[u8], nonce: &[u8]) -> Result<Vec<u8>>
fn decrypt(&self, data: &[u8], nonce: &[u8]) -> Result<Vec<u8>>
Decrypt data without changing the original data.
Source§fn decrypt_in_place(&self, data: &mut Vec<u8>, nonce: &[u8]) -> Result<()>
fn decrypt_in_place(&self, data: &mut Vec<u8>, nonce: &[u8]) -> Result<()>
Decrypt data in-place.
fn decrypt_in_place_detached(&self, data: &mut [u8], nonce: &[u8]) -> Result<()>
Auto Trait Implementations§
impl<T> Freeze for EncAlgo<T>where
T: Freeze,
impl<T> RefUnwindSafe for EncAlgo<T>where
T: RefUnwindSafe,
impl<T> Send for EncAlgo<T>where
T: Send,
impl<T> Sync for EncAlgo<T>where
T: Sync,
impl<T> Unpin for EncAlgo<T>where
T: Unpin,
impl<T> UnwindSafe for EncAlgo<T>where
T: UnwindSafe,
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