Struct nettle::cipher::insecure_do_not_use::Des[][src]

pub struct Des { /* fields omitted */ }

The Data Encryption Standard (DES) defined in FIPS 46-3.

Note

DES is no longer considered a secure cipher. Only use it for legacy applications.

Implementations

impl Des[src]

pub fn with_key(key: &[u8]) -> Result<Self>[src]

Creates a new instance with key that can be used for both encryption and decryption.

pub fn check_parity(key: &[u8]) -> bool[src]

Checks the parity bits of the given DES key. Returns true if parity is correct, false otherwise.

pub fn fix_parity(key: &mut [u8])[src]

Sets the parity bits in the given DES key.

Trait Implementations

impl Cipher for Des[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.