diff --git a/crates/ccc-crypto-wolfssl/src/aead.rs b/crates/ccc-crypto-wolfssl/src/aead.rs index aea4afc..c4aefd3 100644 --- a/crates/ccc-crypto-wolfssl/src/aead.rs +++ b/crates/ccc-crypto-wolfssl/src/aead.rs @@ -103,8 +103,7 @@ fn aes_gcm_256_encrypt( // alignment so the C code's SIMD operations work correctly on ARM64. use std::alloc::{alloc_zeroed, dealloc, Layout}; - // sizeof(Aes) = 288 bytes; alignment = 16. - let layout = Layout::from_size_align(std::mem::size_of::().max(288), 16) + let layout = Layout::from_size_align(std::mem::size_of::(), 16) .expect("layout must be valid"); let aes_ptr = alloc_zeroed(layout) as *mut crate::sys::Aes; @@ -184,7 +183,7 @@ fn aes_gcm_256_decrypt( // alignment so the C code's SIMD operations work correctly on ARM64. use std::alloc::{alloc_zeroed, dealloc, Layout}; - let layout = Layout::from_size_align(std::mem::size_of::().max(288), 16) + let layout = Layout::from_size_align(std::mem::size_of::(), 16) .expect("layout must be valid"); let aes_ptr = alloc_zeroed(layout) as *mut crate::sys::Aes;