Trait gost_modes::StreamCipher[][src]

pub trait StreamCipher {
    pub fn try_apply_keystream(
        &mut self,
        data: &mut [u8]
    ) -> Result<(), LoopError>; pub fn apply_keystream(&mut self, data: &mut [u8]) { ... } }

Synchronous stream cipher core trait.

Required methods

pub fn try_apply_keystream(&mut self, data: &mut [u8]) -> Result<(), LoopError>[src]

Apply keystream to the data, but return an error if end of a keystream will be reached.

If end of the keystream will be achieved with the given data length, method will return Err(LoopError) without modifying provided data.

Loading content...

Provided methods

pub fn apply_keystream(&mut self, data: &mut [u8])[src]

Apply keystream to the data.

It will XOR generated keystream with the data, which can be both encryption and decryption.

Panics

If end of the keystream will be reached with the given data length, method will panic without modifying the provided data.

Loading content...

Implementations on Foreign Types

impl<'_, C> StreamCipher for &'_ mut C where
    C: StreamCipher
[src]

Loading content...

Implementors

impl<C, S> StreamCipher for GostCtr64<C, S> where
    C: BlockCipher<BlockSize = U8> + BlockEncrypt + NewBlockCipher,
    C::ParBlocks: ArrayLength<GenericArray<u8, U8>>,
    S: ArrayLength<u8> + Unsigned + IsGreater<U0> + IsLessOrEqual<U8>, 
[src]

impl<C, S> StreamCipher for GostCtr128<C, S> where
    C: BlockCipher<BlockSize = U16> + BlockEncrypt + NewBlockCipher,
    C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
    S: ArrayLength<u8> + Unsigned + IsGreater<U0> + IsLessOrEqual<U16>, 
[src]

impl<C, Z, S> StreamCipher for GostOfb<C, Z, S> where
    C: BlockCipher + BlockEncrypt + NewBlockCipher,
    C::BlockSize: IsLessOrEqual<U255>,
    S: Unsigned + IsGreater<U0> + IsLessOrEqual<C::BlockSize>,
    Z: ArrayLength<Block<C>> + Unsigned + Mul<C::BlockSize> + IsGreater<U0> + IsLessOrEqual<U255>,
    Prod<Z, C::BlockSize>: ArrayLength<u8>, 
[src]

Loading content...