Skip to content

Commit

Permalink
Update hmac to 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
travisbrown authored and adwhit committed Jul 9, 2021
1 parent 8fdca0f commit 532b804
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion src/auth/raw.rs
Expand Up @@ -306,7 +306,7 @@ impl OAuthParams {
);

// TODO check if key is correct length? Can this fail?
let mut digest = Hmac::<Sha1>::new_varkey(key.as_bytes()).expect("Wrong key length");
let mut digest = Hmac::<Sha1>::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();
Expand Down

0 comments on commit 532b804

Please sign in to comment.