diff --git a/src/protocol/io/mod.rs b/src/protocol/io/mod.rs index 3190285..68d4fa7 100644 --- a/src/protocol/io/mod.rs +++ b/src/protocol/io/mod.rs @@ -38,6 +38,7 @@ impl Aes { } pub fn encrypt(&mut self, elem: &mut [u8]) { + // SAFETY: Cfb8Block is POD (plain old data) let (prefix, blocks, suffix) = unsafe { elem.align_to_mut::() }; debug_assert!(prefix.is_empty()); @@ -47,6 +48,7 @@ impl Aes { } pub fn decrypt(&mut self, elem: &mut [u8]) { + // SAFETY: Cfb8Block is POD (plain old data) let (prefix, blocks, suffix) = unsafe { elem.align_to_mut::() }; debug_assert!(prefix.is_empty());