Skip to main content

BlockCipher

Trait BlockCipher 

Source
pub trait BlockCipher {
    type Block: AsRef<[u8]> + AsMut<[u8]> + Default + Copy;

    // Required methods
    fn block_byte_len() -> usize;
    fn encrypt(&self, inp: &Self::Block) -> Self::Block;
}

Required Associated Types§

Source

type Block: AsRef<[u8]> + AsMut<[u8]> + Default + Copy

Required Methods§

Source

fn block_byte_len() -> usize

Source

fn encrypt(&self, inp: &Self::Block) -> Self::Block

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl BlockCipher for Aes128Enc

Implementors§