Struct gost_modes::Ecb [−][src]
pub struct Ecb<C, P> where
C: BlockCipher + BlockEncrypt + BlockDecrypt + NewBlockCipher,
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 + NewBlockCipher,
P: Padding,
[src]
impl<C, P> BlockMode<C, P> for Ecb<C, P> where
C: BlockCipher + BlockEncrypt + BlockDecrypt + NewBlockCipher,
P: Padding,
[src]type IvSize = UTerm
Initialization Vector size.
pub fn new(cipher: C, _iv: &GenericArray<u8, UTerm>) -> Ecb<C, P>
[src]
pub fn new_from_slices(
key: &[u8],
_iv: &[u8]
) -> Result<Ecb<C, P>, InvalidKeyIvLength>
[src]
key: &[u8],
_iv: &[u8]
) -> Result<Ecb<C, P>, InvalidKeyIvLength>
pub fn encrypt_blocks(
&mut self,
blocks: &mut [GenericArray<u8, <C as BlockCipher>::BlockSize>]
)
[src]
&mut self,
blocks: &mut [GenericArray<u8, <C as BlockCipher>::BlockSize>]
)
pub fn decrypt_blocks(
&mut self,
blocks: &mut [GenericArray<u8, <C as BlockCipher>::BlockSize>]
)
[src]
&mut self,
blocks: &mut [GenericArray<u8, <C as BlockCipher>::BlockSize>]
)
pub 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
pub fn encrypt(
self,
buffer: &mut [u8],
pos: usize
) -> Result<&[u8], BlockModeError>
[src]
self,
buffer: &mut [u8],
pos: usize
) -> Result<&[u8], BlockModeError>
pub fn decrypt(self, buffer: &mut [u8]) -> Result<&[u8], BlockModeError>
[src]
pub fn encrypt_vec(self, plaintext: &[u8]) -> Vec<u8, Global>
[src]
pub fn decrypt_vec(
self,
ciphertext: &[u8]
) -> Result<Vec<u8, Global>, BlockModeError>
[src]
self,
ciphertext: &[u8]
) -> Result<Vec<u8, Global>, BlockModeError>
impl<C, P> Clone for Ecb<C, P> where
C: Clone + BlockCipher + BlockEncrypt + BlockDecrypt + NewBlockCipher,
P: Clone + Padding,
[src]
impl<C, P> Clone for Ecb<C, P> where
C: Clone + BlockCipher + BlockEncrypt + BlockDecrypt + NewBlockCipher,
P: Clone + Padding,
[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,