logo
pub struct StreamLE31<A> where
    A: AeadInPlace,
    A::NonceSize: Sub<U4>,
    <<A as AeadCore>::NonceSize as Sub<U4>>::Output: ArrayLength<u8>, 
{ /* private fields */ }
Available on crate feature stream only.
Expand description

STREAM as instantiated with a 31-bit little endian counter and 1-bit “last block” flag stored as the most significant bit of the counter when interpreted as a 32-bit integer.

The 31-bit + 1-bit value is stored as the last 4 bytes of the AEAD nonce.

Trait Implementations

Create a new STREAM from the given AEAD cipher.

Number of bytes this STREAM primitive requires from the nonce.

Type used as the STREAM counter.

Value to use when incrementing the STREAM counter (i.e. one)

Maximum value of the STREAM counter.

Encrypt an AEAD message in-place at the given position in the STREAM.

Decrypt an AEAD message in-place at the given position in the STREAM.

Available on crate feature alloc only.

Encrypt the given plaintext payload, and return the resulting ciphertext as a vector of bytes. Read more

Available on crate feature alloc only.

Decrypt the given ciphertext slice, and return the resulting plaintext as a vector of bytes. Read more

Obtain Encryptor for this StreamPrimitive.

Obtain Decryptor for this StreamPrimitive.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.