[−][src]Struct block_modes::Ecb
Electronic Codebook (ECB) block cipher mode instance.
Note that new
method ignores IV, so during initialization you can
just pass Default::default()
instead.
Trait Implementations
impl<C, P> BlockMode<C, P> for Ecb<C, P> where
C: BlockCipher + NewBlockCipher,
P: Padding,
[src]
C: BlockCipher + NewBlockCipher,
P: Padding,
type IvSize = U0
Initialization Vector size.
fn new(cipher: C, _iv: &GenericArray<u8, U0>) -> Self
[src]
fn new_var(key: &[u8], _iv: &[u8]) -> Result<Self, InvalidKeyIvLength>
[src]
fn encrypt_blocks(
&mut self,
blocks: &mut [GenericArray<u8, <C as BlockCipher>::BlockSize>]
)
[src]
&mut self,
blocks: &mut [GenericArray<u8, <C as BlockCipher>::BlockSize>]
)
fn decrypt_blocks(
&mut self,
blocks: &mut [GenericArray<u8, <C as BlockCipher>::BlockSize>]
)
[src]
&mut self,
blocks: &mut [GenericArray<u8, <C as BlockCipher>::BlockSize>]
)
fn new_fix(
key: &GenericArray<u8, <C as NewBlockCipher>::KeySize>,
iv: &GenericArray<u8, Self::IvSize>
) -> Self
[src]
key: &GenericArray<u8, <C as NewBlockCipher>::KeySize>,
iv: &GenericArray<u8, Self::IvSize>
) -> Self
fn encrypt(self, buffer: &mut [u8], pos: usize) -> Result<&[u8], BlockModeError>
[src]
fn decrypt(self, buffer: &mut [u8]) -> Result<&[u8], BlockModeError>
[src]
fn encrypt_vec(self, plaintext: &[u8]) -> Vec<u8>ⓘ
[src]
fn decrypt_vec(self, ciphertext: &[u8]) -> Result<Vec<u8>, BlockModeError>
[src]
impl<C: Clone + BlockCipher, P: Clone + Padding> Clone for Ecb<C, P>
[src]
Auto Trait Implementations
impl<C, P> RefUnwindSafe for Ecb<C, P> where
C: RefUnwindSafe,
P: RefUnwindSafe,
C: RefUnwindSafe,
P: RefUnwindSafe,
impl<C, P> Send for Ecb<C, P> where
C: Send,
P: Send,
C: Send,
P: Send,
impl<C, P> Sync for Ecb<C, P> where
C: Sync,
P: Sync,
C: Sync,
P: Sync,
impl<C, P> Unpin for Ecb<C, P> where
C: Unpin,
P: Unpin,
C: Unpin,
P: Unpin,
impl<C, P> UnwindSafe for Ecb<C, P> where
C: UnwindSafe,
P: UnwindSafe,
C: UnwindSafe,
P: UnwindSafe,
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> Same<T> for T
type Output = T
Should always be Self
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>,