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:
parent
c82c0fcbd5
commit
02dc225fa8
3 changed files with 40 additions and 90 deletions
src
|
@ -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())?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue