Commit cf017a9b672fe07761afcbe5c8837aebc33df61f

Cléo Rebert 2022-12-22T17:06:52

Zeroize secret

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/secret.rs b/src/secret.rs
index 6edde97..9dabf89 100644
--- a/src/secret.rs
+++ b/src/secret.rs
@@ -89,6 +89,7 @@ pub enum SecretParseError {
 }
 
 #[derive(Debug, Clone, Eq)]
+#[cfg_attr(feature = "zeroize", derive(zeroize::Zeroize, zeroize::ZeroizeOnDrop))]
 pub enum Secret {
     /// represent a non-encoded "raw" secret
     Raw(Vec<u8>),