pub struct StreamSealer { /* private fields */ }
Available on crate feature
safe_api
only.Expand description
Streaming authenticated encryption.
Implementations
sourceimpl StreamSealer
impl StreamSealer
sourcepub fn new(secret_key: &SecretKey) -> Result<(Self, Nonce), UnknownCryptoError>
pub fn new(secret_key: &SecretKey) -> Result<(Self, Nonce), UnknownCryptoError>
Initialize a StreamSealer
struct with a given key.
sourcepub fn seal_chunk(
&mut self,
plaintext: &[u8],
tag: &StreamTag
) -> Result<Vec<u8>, UnknownCryptoError>
pub fn seal_chunk(
&mut self,
plaintext: &[u8],
tag: &StreamTag
) -> Result<Vec<u8>, UnknownCryptoError>
Encrypts plaintext
. The StreamTag
indicates the type of message.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for StreamSealer
impl Send for StreamSealer
impl Sync for StreamSealer
impl Unpin for StreamSealer
impl UnwindSafe for StreamSealer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more