Skip to content

Commit 5030718

Browse files
committed
manually format secret key
I guess it doesn't have Display for securtiy reasons...
1 parent 97afaf1 commit 5030718

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/random_store.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ pub fn get_or_generate_secret_key() -> Result<SecretKey> {
9393
} else {
9494
// Generate a new random key
9595
let secret_key = SecretKey::generate(&mut rand::thread_rng());
96+
let secret_key_str = hex::encode(secret_key.to_bytes());
9697
println!("Generated new random secret key");
97-
println!("To reuse this key, set the IROH_SECRET={secret_key:?}");
98+
println!("To reuse this key, set the IROH_SECRET={secret_key_str}");
9899
Ok(secret_key)
99100
}
100101
}

0 commit comments

Comments
 (0)