[−][src]Struct lsx::twofish::Twofish
The key-dependent data for a given Twofish key. This can be used to encrypt or decrypt blocks of data with that key. If you're inexperienced with crypto, you probably just thought of using this to encrypt/decrypt each block of your input directly, one block at a time. If so, I beg you to read Wikipedia's article on block cipher modes of operation so that you will understand that this is the least secure way to use a block cipher!
Implementations
impl Twofish
[src]
pub fn new128(key: &[u8; 16]) -> Twofish
[src]
Set up a context to en-/decrypt with a given 128-bit key.
pub fn new192(key: &[u8; 24]) -> Twofish
[src]
Set up a context to en-/decrypt with a given 192-bit key.
pub fn new256(key: &[u8; 32]) -> Twofish
[src]
Set up a context to en-/decrypt with a given 256-bit key.
pub fn encrypt(&self, i: &[u8; 16], o: &mut [u8; 16])
[src]
Encrypt a single block.
pub fn decrypt(&self, i: &[u8; 16], o: &mut [u8; 16])
[src]
Decrypt a single block.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Twofish
impl Send for Twofish
impl Sync for Twofish
impl Unpin for Twofish
impl UnwindSafe for Twofish
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
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>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,