RabbitCore

Struct RabbitCore 

Source
pub struct RabbitCore { /* private fields */ }
Expand description

Core state of the Rabbit stream cipher initialized with key and IV.

Trait Implementations§

Source§

impl BlockSizeUser for RabbitCore

Source§

type BlockSize = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>

Size of the block in bytes.
Source§

fn block_size() -> usize

Return block size in bytes.
Source§

impl Clone for RabbitCore

Source§

fn clone(&self) -> RabbitCore

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl InnerIvInit for RabbitCore

Source§

fn inner_iv_init(inner: RabbitKeyOnlyCore, iv: &Iv) -> Self

Initialize value using inner and iv array.
Source§

fn inner_iv_slice_init( inner: Self::Inner, iv: &[u8], ) -> Result<Self, InvalidLength>

Initialize value using inner and iv slice.
Source§

impl InnerUser for RabbitCore

Source§

impl IvSizeUser for RabbitCore

Source§

type IvSize = UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>

Initialization vector size in bytes.
Source§

fn iv_size() -> usize

Return IV size in bytes.
Source§

impl StreamCipherCore for RabbitCore

Source§

fn remaining_blocks(&self) -> Option<usize>

Return number of remaining blocks before cipher wraps around. Read more
Source§

fn process_with_backend( &mut self, f: impl StreamClosure<BlockSize = Self::BlockSize>, )

Process data using backend provided to the rank-2 closure.
Source§

fn write_keystream_block( &mut self, block: &mut GenericArray<u8, Self::BlockSize>, )

Write keystream block. Read more
Source§

fn write_keystream_blocks( &mut self, blocks: &mut [GenericArray<u8, Self::BlockSize>], )

Write keystream blocks. Read more
Source§

fn apply_keystream_block_inout( &mut self, block: InOut<'_, '_, GenericArray<u8, Self::BlockSize>>, )

Apply keystream block. Read more
Source§

fn apply_keystream_blocks( &mut self, blocks: &mut [GenericArray<u8, Self::BlockSize>], )

Apply keystream blocks. Read more
Source§

fn apply_keystream_blocks_inout( &mut self, blocks: InOutBuf<'_, '_, GenericArray<u8, Self::BlockSize>>, )

Apply keystream blocks. Read more
Source§

fn try_apply_keystream_partial( self, buf: InOutBuf<'_, '_, u8>, ) -> Result<(), StreamCipherError>

Try to apply keystream to data not divided into blocks. Read more
Source§

fn apply_keystream_partial(self, buf: InOutBuf<'_, '_, u8>)

Try to apply keystream to data not divided into blocks. Read more
Source§

impl ZeroizeOnDrop for RabbitCore

Available on crate feature zeroize only.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> KeyIvInit for T
where T: InnerIvInit, <T as InnerUser>::Inner: KeyInit,

Source§

fn new( key: &GenericArray<u8, <T as KeySizeUser>::KeySize>, iv: &GenericArray<u8, <T as IvSizeUser>::IvSize>, ) -> T

Create new value from fixed length key and nonce.
Source§

fn new_from_slices(key: &[u8], iv: &[u8]) -> Result<T, InvalidLength>

Create new value from variable length key and nonce.
Source§

impl<T> KeySizeUser for T
where T: InnerUser, <T as InnerUser>::Inner: KeySizeUser,

Source§

type KeySize = <<T as InnerUser>::Inner as KeySizeUser>::KeySize

Key size in bytes.
Source§

fn key_size() -> usize

Return key size in bytes.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.