diff options
Diffstat (limited to '')
-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 d8de30e..a42bb53 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -75,8 +75,8 @@ pub fn match_auth(basic_auth: BasicAuthParams, required_auth: &RequiredAuth) -> } /// Return `true` if hashing of `password` by `T` algorithm equals to `hash` -pub fn compare_hash<T: Digest>(password: String, hash: &Vec<u8>) -> bool { - get_hash::<T>(password) == *hash +pub fn compare_hash<T: Digest>(password: String, hash: &[u8]) -> bool { + get_hash::<T>(password) == hash } /// Get hash of a `text` |