colm 0.1.0

a block cipher based Encrypt-Linear mix-Encrypt mode
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[cfg(feature = "x16")] pub const KEY_LENGTH: usize = 16;
#[cfg(feature = "x32")] pub const KEY_LENGTH: usize = 32;

pub const BLOCK_LENGTH: usize = 16;


pub trait BlockCipher {
    const KEY_LENGTH: usize;
    const BLOCK_LENGTH: usize;

    fn new(key: &[u8; KEY_LENGTH]) -> Self;
    fn encrypt(&self, block: &mut [u8; BLOCK_LENGTH]);
    fn decrypt(&self, block: &mut [u8; BLOCK_LENGTH]);
}