pub struct SecretStreamDecrypt(/* private fields */);
Expand description
A structure to facilitate secretstream decryption.
Implementations§
source§impl SecretStreamDecrypt
impl SecretStreamDecrypt
sourcepub fn new<K, H>(key: K, header: H) -> SodokenResult<Self>where
K: Into<BufReadSized<KEYBYTES>> + 'static + Send,
H: Into<BufReadSized<HEADERBYTES>> + 'static + Send,
pub fn new<K, H>(key: K, header: H) -> SodokenResult<Self>where
K: Into<BufReadSized<KEYBYTES>> + 'static + Send,
H: Into<BufReadSized<HEADERBYTES>> + 'static + Send,
Construct a new SecretStreamEncrypt instance. Also returns the encryption header bytes.
sourcepub async fn pull<C, A, M>(
&mut self,
cipher: C,
adata: Option<A>,
message: M
) -> SodokenResult<SecretStreamTag>
pub async fn pull<C, A, M>( &mut self, cipher: C, adata: Option<A>, message: M ) -> SodokenResult<SecretStreamTag>
Decrypt a secret stream message, returning the associated tag.
Auto Trait Implementations§
impl RefUnwindSafe for SecretStreamDecrypt
impl Send for SecretStreamDecrypt
impl Sync for SecretStreamDecrypt
impl Unpin for SecretStreamDecrypt
impl UnwindSafe for SecretStreamDecrypt
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