Struct orion::aead::streaming::StreamOpener
source · pub struct StreamOpener { /* private fields */ }
Available on crate feature
safe_api
only.Expand description
Streaming authenticated decryption.
Implementations§
source§impl StreamOpener
impl StreamOpener
sourcepub fn new(
secret_key: &SecretKey,
nonce: &Nonce
) -> Result<Self, UnknownCryptoError>
pub fn new( secret_key: &SecretKey, nonce: &Nonce ) -> Result<Self, UnknownCryptoError>
Initialize a StreamOpener
struct with a given key and nonce.
sourcepub fn open_chunk(
&mut self,
ciphertext: &[u8]
) -> Result<(Vec<u8>, StreamTag), UnknownCryptoError>
pub fn open_chunk( &mut self, ciphertext: &[u8] ) -> Result<(Vec<u8>, StreamTag), UnknownCryptoError>
Decrypts ciphertext
. Returns the decrypted data and the StreamTag
indicating the type of message.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for StreamOpener
impl Send for StreamOpener
impl Sync for StreamOpener
impl Unpin for StreamOpener
impl UnwindSafe for StreamOpener
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