Struct orion::aead::streaming::StreamSealer
source · pub struct StreamSealer { /* private fields */ }
Available on crate feature
safe_api
only.Expand description
Streaming authenticated encryption.
Implementations§
source§impl 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.