Skip to main content

ecb_encrypt

Function ecb_encrypt 

Source
pub fn ecb_encrypt<C: BlockCipher>(cipher: &C, data: &mut [u8])
Expand description

Encrypt data in ECB mode (each block encrypted independently).

§Warning

ECB mode is insecure for most purposes because identical plaintext blocks produce identical ciphertext blocks, revealing patterns in the data.

§Panics

Panics if data.len() is not a multiple of the block size.