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

pub struct Des { /* fields omitted */ }

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


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


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

impl RefUnwindSafe for Des

impl Send for Des

impl Sync for Des

impl Unpin for Des

impl UnwindSafe for Des

Blanket Implementations

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

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

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

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

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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.