We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
KeyObfuscator
Drop
1 parent 6873274 commit 3c62a9fCopy full SHA for 3c62a9f
1 file changed
src/util/key_obfuscator.rs
@@ -151,6 +151,14 @@ impl KeyObfuscator {
151
}
152
153
154
+impl Drop for KeyObfuscator {
155
+ fn drop(&mut self) {
156
+ // Zeroize the owned keys
157
+ self.obfuscation_key.copy_from_slice(&[0u8]);
158
+ self.hashing_key.copy_from_slice(&[0u8]);
159
+ }
160
+}
161
+
162
#[cfg(test)]
163
mod tests {
164
use crate::util::key_obfuscator::KeyObfuscator;
0 commit comments