1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 14:49:20 +02:00

actix-http: Update sha-1 to 0.9 (#1586)

This commit is contained in:
Yuki Okushi
2020-07-03 09:08:24 +09:00
committed by GitHub
parent 0b641a2db2
commit deab634247
8 changed files with 10 additions and 9 deletions

View File

@ -208,10 +208,10 @@ pub fn hash_key(key: &[u8]) -> String {
use sha1::Digest;
let mut hasher = sha1::Sha1::new();
hasher.input(key);
hasher.input(WS_GUID.as_bytes());
hasher.update(key);
hasher.update(WS_GUID.as_bytes());
base64::encode(hasher.result().as_ref())
base64::encode(&hasher.finalize())
}
#[cfg(test)]