Struct rabbit::Rabbit[][src]

pub struct Rabbit { /* fields omitted */ }
Expand description

Rabbit stream cipher state.

Implementations

Creates an empty rabbit state, then setups the given key on it.

See RFC 4503 3.2. Initialization Vector (page 5).

Creates an empty rabbit state, then setups the given key and iv on it.

Restores master state (iv will be lost).

Restores master state, than setups initialization vector iv on it.

Encrypts bytes of data inplace.

Returns:

  • true – OK;
  • false – max message length (16 * 2⁶⁴ bytes) was exceeded. data is not affected.

Decrypts bytes of data inplace (see Rabbit::encrypt_inplace).

Trait Implementations

Formats the value using the given formatter. Read more

Key size in bytes

Nonce size in bytes

Create new stream cipher instance from key and nonce arrays.

Create new stream cipher instance from variable length key and nonce given as byte slices. Read more

Apply keystream to the data, but return an error if end of a keystream will be reached. Read more

Apply keystream to the data. Read more

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

Performs the conversion.

Performs the conversion.

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.