fix(encryption): do not log encrypted binary data (#1352)

This commit is contained in:
Kartikeya Hegde
2023-06-21 14:38:46 +05:30
committed by GitHub
parent 21f2ccd47c
commit b0c103a193
5 changed files with 54 additions and 35 deletions

View File

@ -142,6 +142,19 @@ where
}
*/
/// Strategy for Encryption
#[derive(Debug)]
pub struct EncryptionStratergy;
impl<T> Strategy<T> for EncryptionStratergy
where
T: AsRef<[u8]>,
{
fn fmt(value: &T, fmt: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(fmt, "*** Encrypted {} of bytes ***", value.as_ref().len())
}
}
/// Client secret
#[derive(Debug)]
pub struct ClientSecret;