Impl Debug for PayingKey

This commit is contained in:
Deirdre Connolly 2020-03-26 21:34:35 -04:00 committed by Deirdre Connolly
parent 2fa566a35f
commit ffac1a33d7
1 changed files with 9 additions and 1 deletions

View File

@ -51,9 +51,17 @@ impl From<SpendingKey> for ReceivingKey {
}
/// Derived from a _SpendingKey_.
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct PayingKey(pub [u8; 32]);
impl fmt::Debug for PayingKey {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_tuple("PayingKey")
.field(&hex::encode(&self.0))
.finish()
}
}
impl From<SpendingKey> for PayingKey {
/// For this invocation of SHA256Compress as the PRF, t=1.
///