From 0562aae2c0056b1899c0db1061744cbd0527c206 Mon Sep 17 00:00:00 2001 From: aprzn Date: Sat, 25 Feb 2023 22:25:35 -0500 Subject: [PATCH] hash ils --- src/gd.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gd.rs b/src/gd.rs index c4bfa68..bc99fea 100644 --- a/src/gd.rs +++ b/src/gd.rs @@ -53,11 +53,11 @@ impl InnerLevel { let mut decoder = GzDecoder::<&[u8]>::new(b64.as_ref()); let mut ils = String::new(); decoder.read_to_string(&mut ils).ok()?; - Self::try_from_ils(&ils) + Some(Self(ils.into())) } - pub fn try_from_ils(ils: &str) -> Option { - todo!() + pub fn hash(self) -> md5::Digest { + md5::compute(self.0) } }