[domistream] WIP: rustfmt, doc link, clippy fixes (one collapsible-if left in rtsp/mod.rs), PROTOCOL.md status
Paused at Mark's request.
This commit is contained in:
@@ -32,8 +32,8 @@ fn ecb(key: &PairingKey, data: &[u8], encrypt: bool) -> Result<Vec<u8>> {
|
||||
}
|
||||
let cipher = Aes128::new(key.into());
|
||||
let mut out = data.to_vec();
|
||||
for chunk in out.chunks_exact_mut(16) {
|
||||
let block: &mut aes::Block = chunk.try_into().map_err(|_| malformed("aes block"))?;
|
||||
for chunk in out.as_chunks_mut::<16>().0 {
|
||||
let block: &mut aes::Block = chunk.into();
|
||||
if encrypt {
|
||||
cipher.encrypt_block(block);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user