Skip to main content

Rc4

Struct Rc4 

Source
pub struct Rc4<const KEY_LEN: usize, D: DropStrategy = Zeroize>(/* private fields */);
Expand description

An algorithm that performs RC4 encryption and decryption. This algorithm is generic over drop strategy.

RC4 is a stream cipher that uses a variable-length key (1-256 bytes). The key is stored alongside the encrypted data and is used to reproduce the keystream for decryption at runtime.

Trait Implementations§

Source§

impl<const KEY_LEN: usize, D: DropStrategy<Extra = [u8; KEY_LEN]>> Algorithm for Rc4<KEY_LEN, D>

Source§

type Drop = D

The drop strategy to use when the encrypted data is dropped.
Source§

type Extra = [u8; KEY_LEN]

Additional data stored alongside the encrypted buffer. Read more

Auto Trait Implementations§

§

impl<const KEY_LEN: usize, D> Freeze for Rc4<KEY_LEN, D>

§

impl<const KEY_LEN: usize, D> RefUnwindSafe for Rc4<KEY_LEN, D>
where D: RefUnwindSafe,

§

impl<const KEY_LEN: usize, D> Send for Rc4<KEY_LEN, D>
where D: Send,

§

impl<const KEY_LEN: usize, D> Sync for Rc4<KEY_LEN, D>
where D: Sync,

§

impl<const KEY_LEN: usize, D> Unpin for Rc4<KEY_LEN, D>
where D: Unpin,

§

impl<const KEY_LEN: usize, D> UnsafeUnpin for Rc4<KEY_LEN, D>

§

impl<const KEY_LEN: usize, D> UnwindSafe for Rc4<KEY_LEN, D>
where D: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.