Struct idea_crypto::Idea
source · [−]Expand description
The International Data Encryption Algorithm (IDEA) block cipher.
Fields
enc_keys: [u16; 52]dec_keys: [u16; 52]Implementations
sourceimpl Idea
impl Idea
pub fn expand_key(&mut self, key: &Key<Self>)
pub fn invert_sub_keys(&mut self)
pub fn crypt(&self, block: Vec<u8>, sub_keys: &[u16; 52]) -> Vec<u8>
pub fn mul(&self, a: u16, b: u16) -> u16
pub fn add(&self, a: u16, b: u16) -> u16
pub fn mul_inv(&self, a: u16) -> u16
pub fn add_inv(&self, a: u16) -> u16
Trait Implementations
sourceimpl AlgorithmName for Idea
impl AlgorithmName for Idea
sourcefn write_alg_name(f: &mut Formatter<'_>) -> Result
fn write_alg_name(f: &mut Formatter<'_>) -> Result
Write algorithm name into f.
sourceimpl KeyInit for Idea
impl KeyInit for Idea
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
Create new value from variable size key.
impl Copy for Idea
Auto Trait Implementations
impl RefUnwindSafe for Idea
impl Send for Idea
impl Sync for Idea
impl Unpin for Idea
impl UnwindSafe for Idea
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more