MCPcopy Create free account
hub / github.com/consensus-shipyard/ipc / zeroize

Method zeroize

ipc/types/src/keys.rs:38–46  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

36
37impl Zeroize for PrivateKey {
38 fn zeroize(&mut self) {
39 // Zeroize the raw key bytes
40 self.key_bytes.zeroize();
41 // Create a new default SigningKey to replace the current one
42 // This follows the pattern from fendermint/crypto
43 if let Ok(default_key) = SigningKey::from_slice(&[1u8; 32]) {
44 let _ = std::mem::replace(&mut self.inner, default_key);
45 }
46 }
47}
48
49impl Drop for PrivateKey {

Callers 5

dropMethod · 0.45
test_zeroizationFunction · 0.45
dropMethod · 0.45
dropMethod · 0.45
dropMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_zeroizationFunction · 0.36