pub struct Encrypter;
Implementations§
Source§impl Encrypter
impl Encrypter
Sourcepub fn encrypt<C>(
plaintext: &str,
password: &str,
provider: impl EncryptProvider<Cipher = C>,
cipher: C,
) -> Result<EncryptionResult>
pub fn encrypt<C>( plaintext: &str, password: &str, provider: impl EncryptProvider<Cipher = C>, cipher: C, ) -> Result<EncryptionResult>
Uses impl trait to accept any type that implements EncryptProvider to perform the encryption
Auto Trait Implementations§
impl Freeze for Encrypter
impl RefUnwindSafe for Encrypter
impl Send for Encrypter
impl Sync for Encrypter
impl Unpin for Encrypter
impl UnwindSafe for Encrypter
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