pub struct SecretStreamEncrypt(/* private fields */);
Expand description
A structure to facilitate secretstream encryption.
Implementations§
source§impl SecretStreamEncrypt
impl SecretStreamEncrypt
sourcepub fn new<K, H>(key: K, header: H) -> SodokenResult<Self>
pub fn new<K, H>(key: K, header: H) -> SodokenResult<Self>
Construct a new SecretStreamEncrypt instance. Also returns the encryption header bytes.
sourcepub async fn push_message<M, A, C>(
&mut self,
message: M,
adata: Option<A>,
cipher: C
) -> SodokenResult<()>
pub async fn push_message<M, A, C>( &mut self, message: M, adata: Option<A>, cipher: C ) -> SodokenResult<()>
Encrypt a “Message” tagged message onto the output stream.
sourcepub async fn push_push<M, A, C>(
&mut self,
message: M,
adata: Option<A>,
cipher: C
) -> SodokenResult<()>
pub async fn push_push<M, A, C>( &mut self, message: M, adata: Option<A>, cipher: C ) -> SodokenResult<()>
Encrypt a “Push” tagged message onto the output stream.
sourcepub async fn push_rekey<M, A, C>(
&mut self,
message: M,
adata: Option<A>,
cipher: C
) -> SodokenResult<()>
pub async fn push_rekey<M, A, C>( &mut self, message: M, adata: Option<A>, cipher: C ) -> SodokenResult<()>
Encrypt a “Rekey” tagged message onto the output stream.
sourcepub async fn push_final<M, A, C>(
&mut self,
message: M,
adata: Option<A>,
cipher: C
) -> SodokenResult<()>
pub async fn push_final<M, A, C>( &mut self, message: M, adata: Option<A>, cipher: C ) -> SodokenResult<()>
Encrypt a “Final” tagged message onto the output stream.
Auto Trait Implementations§
impl RefUnwindSafe for SecretStreamEncrypt
impl Send for SecretStreamEncrypt
impl Sync for SecretStreamEncrypt
impl Unpin for SecretStreamEncrypt
impl UnwindSafe for SecretStreamEncrypt
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