From ffd26a7da6bbe655ff700cad83287690dd5b0227 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 26 Jun 2020 11:50:10 +0200 Subject: Update sha2 to 0.9 --- src/auth.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/auth.rs b/src/auth.rs index 34c864c..6081a9d 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -83,8 +83,8 @@ pub fn compare_hash(password: &str, hash: &[u8]) -> bool { /// Get hash of a `text` pub fn get_hash(text: &str) -> Vec { let mut hasher = T::new(); - hasher.input(text); - hasher.result().to_vec() + hasher.update(text); + hasher.finalize().to_vec() } impl Middleware for Auth { -- cgit v1.2.3