From de5e503b3d44a5eedd372a7d9717795f994aed6a Mon Sep 17 00:00:00 2001 From: moana Date: Wed, 18 Sep 2024 11:04:20 +0200 Subject: [PATCH] core: Add comment on `ZeroizeOnDrop` Resolves #244 --- core/src/keys/secret.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/keys/secret.rs b/core/src/keys/secret.rs index 83d97e2..a20398f 100644 --- a/core/src/keys/secret.rs +++ b/core/src/keys/secret.rs @@ -42,6 +42,11 @@ use subtle::{Choice, ConstantTimeEq}; /// /// sk.zeroize(); /// ``` +/// +/// # Note +/// Implementing `ZeroizeOnDrop` seems like an excellent way to lift the burden +/// of manually zeroizing after use off the user, but unfortunately it doesn't +/// delete the memory reliably. See #244 #[derive(Clone, Eq, Debug, Zeroize)] #[cfg_attr( feature = "rkyv-impl",