Skip to content

Commit

Permalink
change Debug notation for EncryptionUtils to print hex strings
Browse files Browse the repository at this point in the history
  • Loading branch information
kent-3 committed May 10, 2024
1 parent 74125cd commit 5e4855c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions secretrs/src/utils/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
//! ````
use aes_siv::{siv::Aes128Siv, Key, KeyInit};
use hex::ToHex;
use hex_literal::hex;
use nanorand::rand::Rng;
use x25519_dalek::{PublicKey, StaticSecret};
Expand Down Expand Up @@ -88,10 +89,13 @@ use std::fmt;
impl fmt::Debug for EncryptionUtils {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("EncryptionUtils")
.field("seed", &self.seed)
.field("seed", &self.seed.encode_hex::<String>())
.field("privkey", &"[REDACTED]")
.field("pubkey", &self.pubkey)
.field("consensus_io_pubkey", &self.consensus_io_pubkey)
.field("pubkey", &self.pubkey.encode_hex::<String>())
.field(
"consensus_io_pubkey",
&self.consensus_io_pubkey.encode_hex::<String>(),
)
.finish()
}
}
Expand Down

0 comments on commit 5e4855c

Please sign in to comment.