decrypt_block

Function decrypt_block 

Source
pub fn decrypt_block(
    cypher_block: &[u8],
    expanded_key: &ExpandedKey,
) -> [u8; 16]
Expand description

Decrypt a single block of data using an expanded key.

This function takes the expanded key, and not the original key, because it is used to implement crate::decrypt for each crate::ModeOfOperation. In order not to re-expand the key for every block, the expanded key is used instead.

ยงWarning

This function does not enforce the block size, and as such, passing a block of size other than 16 bytes produces undefined behavior.

Ideally, you should only use this to implement your own mode of operation, for most use cases, you should consider using the higher-level crate::decrypt instead.