pub struct DecryptAwaitingPassword<R> { /* private fields */ }
Implementations§
Source§impl<R> DecryptAwaitingPassword<R>
impl<R> DecryptAwaitingPassword<R>
Sourcepub fn try_password(
self: Box<Self>,
password: &[u8],
) -> Result<DecryptStream<R>, Box<Self>>
pub fn try_password( self: Box<Self>, password: &[u8], ) -> Result<DecryptStream<R>, Box<Self>>
This method is very blocking.
If you’re using Tokio I advise that you wrap this call in a spawn_blocking
.
If a Result::Err
is returned it indicates the password was incorrect.
SECURITY: It is advisable to zero out the memory containing the password after this method returns.
Auto Trait Implementations§
impl<R> Freeze for DecryptAwaitingPassword<R>where
R: Freeze,
impl<R> RefUnwindSafe for DecryptAwaitingPassword<R>where
R: RefUnwindSafe,
impl<R> Send for DecryptAwaitingPassword<R>where
R: Send,
impl<R> Sync for DecryptAwaitingPassword<R>where
R: Sync,
impl<R> Unpin for DecryptAwaitingPassword<R>where
R: Unpin,
impl<R> UnwindSafe for DecryptAwaitingPassword<R>where
R: 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