We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c981d6 commit f1a041aCopy full SHA for f1a041a
1 file changed
wrapper/rust/wolfssl-wolfcrypt/src/chacha20_poly1305.rs
@@ -243,6 +243,17 @@ impl ChaCha20Poly1305 {
243
}
244
245
246
+impl Drop for ChaCha20Poly1305 {
247
+ fn drop(&mut self) {
248
+ unsafe {
249
+ let ptr = &mut self.wc_ccp as *mut sys::ChaChaPoly_Aead as *mut u8;
250
+ for i in 0..core::mem::size_of::<sys::ChaChaPoly_Aead>() {
251
+ core::ptr::write_volatile(ptr.add(i), 0);
252
+ }
253
254
255
+}
256
+
257
// ---------------------------------------------------------------------------
258
// ChaCha20-Poly1305 aead trait implementations
259
0 commit comments