Struct block_modes::Ecb [−][src]
pub struct Ecb<C: BlockCipher + BlockEncrypt + BlockDecrypt, P: Padding> { /* fields omitted */ }
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 + BlockEncrypt + BlockDecrypt,
P: Padding,
[src]
impl<C, P> BlockMode<C, P> for Ecb<C, P> where
C: BlockCipher + BlockEncrypt + BlockDecrypt,
P: Padding,
[src]type IvSize = U0
Initialization Vector size.
fn new(cipher: C, _iv: &GenericArray<u8, U0>) -> Self
[src]
fn new_from_slices(key: &[u8], _iv: &[u8]) -> Result<Self, InvalidKeyIvLength> where
C: NewBlockCipher,
[src]
C: NewBlockCipher,
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 where
C: NewBlockCipher,
[src]
key: &GenericArray<u8, <C as NewBlockCipher>::KeySize>,
iv: &GenericArray<u8, Self::IvSize>
) -> Self where
C: NewBlockCipher,
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 + BlockEncrypt + BlockDecrypt, P: Clone + Padding> Clone for Ecb<C, P>
[src]
impl<C: Clone + BlockCipher + BlockEncrypt + BlockDecrypt, 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,
impl<C, P> RefUnwindSafe for Ecb<C, P> where
C: RefUnwindSafe,
P: RefUnwindSafe,
impl<C, P> UnwindSafe for Ecb<C, P> where
C: UnwindSafe,
P: UnwindSafe,
impl<C, P> UnwindSafe for Ecb<C, P> where
C: UnwindSafe,
P: UnwindSafe,