diff --git a/openmls/src/ciphersuite/mac.rs b/openmls/src/ciphersuite/mac.rs index 5547e7a163..94976ecab0 100644 --- a/openmls/src/ciphersuite/mac.rs +++ b/openmls/src/ciphersuite/mac.rs @@ -13,7 +13,7 @@ pub struct Mac { impl std::fmt::Debug for Mac { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - write!(f, "{:x?}", self.mac_value.as_slice()) + write!(f, "{}", hex::encode(self.mac_value.as_slice())) } } diff --git a/openmls/src/ciphersuite/signature.rs b/openmls/src/ciphersuite/signature.rs index 7a463b262d..d70b8912c7 100644 --- a/openmls/src/ciphersuite/signature.rs +++ b/openmls/src/ciphersuite/signature.rs @@ -9,7 +9,7 @@ use super::{LABEL_PREFIX, *}; /// Signature. #[derive( - PartialEq, Eq, Clone, Serialize, Deserialize, TlsDeserialize, TlsSerialize, TlsSize, +PartialEq, Eq, Clone, Serialize, Deserialize, TlsDeserialize, TlsSerialize, TlsSize, )] pub struct Signature { value: VLBytes, @@ -17,7 +17,7 @@ pub struct Signature { impl std::fmt::Debug for Signature { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - write!(f, "{:x?}", self.value.as_slice()) + write!(f, "{}", hex::encode(self.value.as_slice())) } } @@ -60,7 +60,7 @@ impl From<(&str, &[u8])> for SignContent { /// A public signature key. #[derive( - Eq, PartialEq, Hash, Clone, Serialize, Deserialize, TlsSerialize, TlsDeserialize, TlsSize, +Eq, PartialEq, Hash, Clone, Serialize, Deserialize, TlsSerialize, TlsDeserialize, TlsSize, )] pub struct SignaturePublicKey { pub(in crate::ciphersuite) value: VLBytes, @@ -68,7 +68,7 @@ pub struct SignaturePublicKey { impl std::fmt::Debug for SignaturePublicKey { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - write!(f, "{:x?}", self.value.as_slice()) + write!(f, "{}", hex::encode(self.value.as_slice())) } } diff --git a/openmls/src/extensions/external_pub_extension.rs b/openmls/src/extensions/external_pub_extension.rs index 6067ae4aff..8387c5d21e 100644 --- a/openmls/src/extensions/external_pub_extension.rs +++ b/openmls/src/extensions/external_pub_extension.rs @@ -19,7 +19,7 @@ pub struct ExternalPubExtension { impl std::fmt::Debug for ExternalPubExtension { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - write!(f, "{:x?}", self.external_pub.as_slice()) + write!(f, "{}", hex::encode(self.external_pub.as_slice())) } } diff --git a/openmls/src/treesync/node/encryption_keys.rs b/openmls/src/treesync/node/encryption_keys.rs index 2cd20adf24..e8cb07e5c7 100644 --- a/openmls/src/treesync/node/encryption_keys.rs +++ b/openmls/src/treesync/node/encryption_keys.rs @@ -29,7 +29,7 @@ pub struct EncryptionKey { impl std::fmt::Debug for EncryptionKey { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - write!(f, "{:x?}", self.key.as_slice().to_vec()) + write!(f, "{}", hex::encode(self.key.as_slice().to_vec())) } }