aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/auth.rs4
1 files changed, 2 insertions, 2 deletions
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<T: Digest>(password: &str, hash: &[u8]) -> bool {
/// Get hash of a `text`
pub fn get_hash<T: Digest>(text: &str) -> Vec<u8> {
let mut hasher = T::new();
- hasher.input(text);
- hasher.result().to_vec()
+ hasher.update(text);
+ hasher.finalize().to_vec()
}
impl Middleware<crate::MiniserveConfig> for Auth {