[−][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: BlockCipher, P: Padding> BlockMode<C, P> for Ecb<C, P>
[src]
fn new(cipher: C, _iv: &GenericArray<u8, <C as BlockCipher>::BlockSize>) -> 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 BlockCipher>::KeySize>,
iv: &GenericArray<u8, <C as BlockCipher>::BlockSize>
) -> Self
[src]
key: &GenericArray<u8, <C as BlockCipher>::KeySize>,
iv: &GenericArray<u8, <C as BlockCipher>::BlockSize>
) -> Self
Create a new block mode instance from fixed sized key and IV.
fn encrypt(self, buffer: &mut [u8], pos: usize) -> Result<&[u8], BlockModeError>
[src]
Encrypt message in-place. Read more
fn decrypt(self, buffer: &mut [u8]) -> Result<&[u8], BlockModeError>
[src]
Decrypt message in-place. Read more
fn encrypt_vec(self, plaintext: &[u8]) -> Vec<u8>
[src]
Encrypt message and store result in vector.
fn decrypt_vec(self, ciphertext: &[u8]) -> Result<Vec<u8>, BlockModeError>
[src]
Encrypt message and store result in vector.
Auto Trait Implementations
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,
Blanket Implementations
impl<T, U> TryFrom 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> From for T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
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>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self