diff --git a/openmls/src/ciphersuite/mac.rs b/openmls/src/ciphersuite/mac.rs index 7e721bb458..5547e7a163 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, "{}", std::str::from_utf8(self.mac_value.as_slice()).unwrap_or_default()) + write!(f, "{:x?}", self.mac_value.as_slice()) } } diff --git a/openmls/src/ciphersuite/signature.rs b/openmls/src/ciphersuite/signature.rs index 228c28cbcd..7a463b262d 100644 --- a/openmls/src/ciphersuite/signature.rs +++ b/openmls/src/ciphersuite/signature.rs @@ -17,7 +17,7 @@ pub struct Signature { impl std::fmt::Debug for Signature { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", std::str::from_utf8(self.value.as_slice()).unwrap_or_default()) + write!(f, "{:x?}", self.value.as_slice()) } } diff --git a/openmls/src/extensions/external_pub_extension.rs b/openmls/src/extensions/external_pub_extension.rs index 8931924dd6..6067ae4aff 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, "{}", std::str::from_utf8(self.external_pub.as_slice()).unwrap_or_default()) + write!(f, "{:x?}", self.external_pub.as_slice()) } }