Idea

Struct Idea 

Source
pub struct Idea { /* private fields */ }

Implementations§

Source§

impl Idea

Source

pub fn new(key: &[u8]) -> CryptoResult<Self>

Trait Implementations§

Source§

impl BlockCipher for Idea

Source§

fn block_size(&self) -> usize

the cipher’s block size(bytes).
Source§

fn encrypt_block(&self, inout: &mut [u8])

encrypt a block.
Source§

fn decrypt_block(&self, inout: &mut [u8])

decrypt a block.
Source§

impl BlockCipherMarker for Idea

Auto Trait Implementations§

§

impl Freeze for Idea

§

impl RefUnwindSafe for Idea

§

impl Send for Idea

§

impl Sync for Idea

§

impl Unpin for Idea

§

impl UnwindSafe for Idea

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<B> CbcDecryptor<B> for B
where B: BlockCipher + CbcDecryptorMarker + 'static,

Source§

fn to_cbc_dec(self, iv: &[u8]) -> impl BlockMode + 'static

Creates a new CBC decrypter Read more
Source§

impl<B> CbcEncryptor<B> for B
where B: BlockCipher + CbcEncryptorMarker + 'static,

Source§

fn to_cbc_enc(self, iv: &[u8]) -> impl BlockMode + 'static

Creates a new CBC encryptor Read more
Source§

impl<T> Cfb for T
where T: BlockCipher + CfbMarker + 'static,

Source§

fn to_cfb_encryptor( self, iv: &[u8], ) -> Result<impl StreamCipher + 'static, CryptoError>

Create a new CFB encryptor with the given IV
Source§

fn to_cfb_decryptor( self, iv: &[u8], ) -> Result<impl StreamCipher + 'static, CryptoError>

Create a new CFB decrypter with the given IV
Source§

impl<T> Ctr for T
where T: BlockCipher + CtrMarker + 'static,

Source§

fn to_ctr(self, iv: &[u8]) -> Result<impl StreamCipher + 'static, CryptoError>

Source§

impl<T> Ecb for T
where T: BlockCipher + EcbMarker + 'static,

Source§

fn to_ecb(self) -> Result<impl BlockMode + 'static, CryptoError>

§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Gcm for T
where T: BlockCipher + GcmMarker + 'static,

Source§

fn to_gcm(self) -> Result<impl Aead<GCM_TAG_SIZE>, CryptoError>

Source§

fn to_gcm_with_params<const NONCE_SIZE: usize, const TAG_SIZE: usize>( self, ) -> Result<impl Aead<TAG_SIZE>, CryptoError>

§

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

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Ofb for T
where T: BlockCipher + OfbMarker + 'static,

Source§

fn to_ofb(self, iv: &[u8]) -> Result<impl StreamCipher + 'static, CryptoError>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, U> TryFrom<U> for T
where 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>

Performs the conversion.
§

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.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> CbcDecryptorMarker for T

Source§

impl<T> CbcEncryptorMarker for T

Source§

impl<T> CfbMarker for T

Source§

impl<T> CtrMarker for T

Source§

impl<T> EcbMarker for T

Source§

impl<T> GcmMarker for T

Source§

impl<T> OfbMarker for T