From 532b804e4d2b2574eb2ddc71bd93878897adfb29 Mon Sep 17 00:00:00 2001 From: Travis Brown Date: Tue, 6 Jul 2021 17:47:59 +0200 Subject: [PATCH] Update hmac to 0.11 --- Cargo.toml | 2 +- src/auth/raw.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3ee3e59..981671f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ base64 = "0.13" chrono = { version = "0.4", features = ["serde"] } futures = "0.3" derive_more = "0.99" -hmac = "0.10" +hmac = "0.11" hyper = { version = "0.14", features = ["http1", "http2", "client", "stream"] } hyper-rustls = { version = "0.22", optional = true, default-features = false } hyper-tls = { version = "0.5", optional = true } diff --git a/src/auth/raw.rs b/src/auth/raw.rs index c95fce4..1078db6 100644 --- a/src/auth/raw.rs +++ b/src/auth/raw.rs @@ -306,7 +306,7 @@ impl OAuthParams { ); // TODO check if key is correct length? Can this fail? - let mut digest = Hmac::::new_varkey(key.as_bytes()).expect("Wrong key length"); + let mut digest = Hmac::::new_from_slice(key.as_bytes()).expect("Wrong key length"); digest.update(base_str.as_bytes()); let mut params: BTreeMap<&'static str, Cow<'static, str>> = BTreeMap::new();