pub struct Des { /* private fields */ }Expand description
A DES cipher keyed with a single 64-bit key (including parity bits).
Implementations§
Source§impl Des
impl Des
Sourcepub fn new(key: &[u8; 8]) -> Result<Self, DesKeyError>
pub fn new(key: &[u8; 8]) -> Result<Self, DesKeyError>
Create a new DES instance from an 8-byte key.
Sourcepub fn new_unchecked(key: &[u8; 8]) -> Self
pub fn new_unchecked(key: &[u8; 8]) -> Self
Create DES from an 8-byte key without weak-key screening.
This is intended for known-answer tests that intentionally exercise weak key behavior from FIPS 74 style vector sets.
Sourcepub fn new_wiping(key: &mut [u8; 8]) -> Result<Self, DesKeyError>
pub fn new_wiping(key: &mut [u8; 8]) -> Result<Self, DesKeyError>
Create a new DES instance and wipe the provided key buffer.
Trait Implementations§
Source§impl BlockCipher for Des
impl BlockCipher for Des
Auto Trait Implementations§
impl Freeze for Des
impl RefUnwindSafe for Des
impl Send for Des
impl Sync for Des
impl Unpin for Des
impl UnsafeUnpin for Des
impl UnwindSafe for Des
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more