diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2020-06-26 09:50:10 +0000 |
---|---|---|
committer | Sven-Hendrik Haase <svenstaro@gmail.com> | 2020-06-26 09:50:20 +0000 |
commit | ffd26a7da6bbe655ff700cad83287690dd5b0227 (patch) | |
tree | f0223a4909c33b763dd64dbc0279c19594d7f92b /src/auth.rs | |
parent | Create FUNDING.yml (diff) | |
download | miniserve-ffd26a7da6bbe655ff700cad83287690dd5b0227.tar.gz miniserve-ffd26a7da6bbe655ff700cad83287690dd5b0227.zip |
Update sha2 to 0.9
Diffstat (limited to 'src/auth.rs')
-rw-r--r-- | src/auth.rs | 4 |
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 { |