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();