pub struct Encrypt<R> { /* private fields */ }
Implementations§
Source§impl<R> Encrypt<R>
impl<R> Encrypt<R>
Sourcepub fn new_uncompressed<RNG: TryCryptoRng>(
read: R,
password: &[u8],
rng: &mut RNG,
) -> Result<Self, RNG::Error>
pub fn new_uncompressed<RNG: TryCryptoRng>( read: R, password: &[u8], rng: &mut RNG, ) -> Result<Self, RNG::Error>
This method is very blocking.
If you’re using Tokio I advise that you wrap this call in a spawn_blocking
.
It’s very important that you provide the correct length of the read
stream otherwise you’ll get a corrupted stream.
SECURITY: It is advisable to zero out the memory containing the password after this method returns.
Trait Implementations§
Source§impl<E, R: Stream<Item = Result<Bytes, E>>> Stream for Encrypt<R>
impl<E, R: Stream<Item = Result<Bytes, E>>> Stream for Encrypt<R>
impl<'__pin, R> Unpin for Encrypt<R>where
PinnedFieldsOf<__Origin<'__pin, R>>: Unpin,
Auto Trait Implementations§
impl<R> Freeze for Encrypt<R>where
R: Freeze,
impl<R> RefUnwindSafe for Encrypt<R>where
R: RefUnwindSafe,
impl<R> Send for Encrypt<R>where
R: Send,
impl<R> Sync for Encrypt<R>where
R: Sync,
impl<R> UnwindSafe for Encrypt<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