[][src]Struct block_modes::Pcbc

pub struct Pcbc<C: BlockCipher, P: Padding> { /* fields omitted */ }

Propagating Cipher Block Chaining (PCBC) mode instance.

Methods

impl<C: BlockCipher, P: Padding> Pcbc<C, P>[src]

pub fn new(
    cipher: C,
    iv: &GenericArray<u8, <C as BlockCipher>::BlockSize>
) -> Self
[src]

Trait Implementations

impl<C: BlockCipher, P: Padding> BlockMode<C, P> for Pcbc<C, P>[src]

fn new_fix(
    key: &GenericArray<u8, <C as BlockCipher>::KeySize>,
    iv: &GenericArray<u8, <C as BlockCipher>::BlockSize>
) -> Self
[src]

Create a new block mode instance from fixed sized key and IV.

fn new_var(key: &[u8], iv: &[u8]) -> Result<Self, InvalidKeyIvLength>[src]

Create a new block mode instance from variable size key and IV. Read more

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

Important traits for Vec<u8>
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 Pcbc<C, P> where
    C: Send,
    P: Send,
    <C as BlockCipher>::BlockSize: ArrayLength<u8>, 

impl<C, P> Sync for Pcbc<C, P> where
    C: Sync,
    P: Sync,
    <C as BlockCipher>::BlockSize: ArrayLength<u8>, 

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self