From 09e651372adbcff8198ad4efdf2ea62a3e99f434 Mon Sep 17 00:00:00 2001 From: Zachary Dremann Date: Fri, 28 Nov 2025 00:32:12 -0500 Subject: [PATCH] fix: no need to jump through hex for md5 digest --- src/openssl.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openssl.rs b/src/openssl.rs index afd0901..878814d 100644 --- a/src/openssl.rs +++ b/src/openssl.rs @@ -30,8 +30,7 @@ fn sha256_digest(data: &[u8]) -> Vec { /// Returns the MD5 hash of the provided data fn md5_digest(data: &[u8]) -> Vec { - // There has to be a cleaner way to do this, but it works... - hex::decode(format!("{:x}", md5::compute(data))).expect("Failed to decode MD5 hash") + md5::compute(data).to_vec() } /// Returns the request hash of the provided data