Implement Debug for PrivKey
It returns a fixed string to prevent accidental data leakage.
This commit is contained in:
parent
f7b95c7533
commit
5f912bdeae
|
@ -153,6 +153,12 @@ impl fmt::Display for Privkey {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for Privkey {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "[private key data]")
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for Privkey {
|
||||
type Err = encode::Error;
|
||||
fn from_str(s: &str) -> Result<Privkey, encode::Error> {
|
||||
|
|
Loading…
Reference in New Issue