(&mut self)
| 36 | |
| 37 | impl 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 | |
| 49 | impl Drop for PrivateKey { |
no outgoing calls