Update build dependencies to latest versions

Update build dependencies to latest version, also use the 2021 Rust
edition. This is also the next version of `webhookey` with version
number 0.1.1.
This commit is contained in:
finga 2021-11-06 12:06:10 +01:00
parent c82c0fcbd5
commit 02dc225fa8
3 changed files with 40 additions and 90 deletions

View file

@ -351,7 +351,7 @@ fn accept_ip(hook_name: &str, client_ip: &IpAddr, ip: &IpFilter) -> bool {
}
fn validate_request(secret: &str, signature: &str, data: &[u8]) -> Result<()> {
let mut mac = Hmac::<Sha256>::new_varkey(secret.as_bytes())
let mut mac = Hmac::<Sha256>::new_from_slice(secret.as_bytes())
.map_err(|e| anyhow!("Could not create hasher with secret: {}", e))?;
mac.update(data);
let raw_signature = hex::decode(signature.as_bytes())?;