Struct miscreant::stream::Encryptor [] [src]

pub struct Encryptor<A: Algorithm> { /* fields omitted */ }

A STREAM encryptor with a 32-bit counter, generalized for any AEAD algorithm

This corresponds to the ℰ stream encryptor object as defined in the paper Online Authenticated-Encryption and its Nonce-Reuse Misuse-Resistance

Methods

impl<A: Algorithm> Encryptor<A>
[src]

[src]

Create a new STREAM encryptor, initialized with a given key and nonce.

Panics if the key or nonce is the wrong size.

[src]

Encrypt the next message in the stream in-place

[src]

Encrypt the final message in-place, consuming the stream encryptor

[src]

Encrypt the next message in the stream, allocating and returning a Vec<u8> for the ciphertext

[src]

Encrypt the final message in the stream, allocating and returning a Vec<u8> for the ciphertext