mirror of
https://github.com/tokio-rs/axum.git
synced 2025-03-13 19:27:53 +01:00
Upgrade dependencies (#1746)
This commit is contained in:
parent
37922ab840
commit
2c9d2dea0e
3 changed files with 5 additions and 3 deletions
|
@ -54,7 +54,7 @@ form_urlencoded = { version = "1.1.0", optional = true }
|
|||
percent-encoding = { version = "2.1", optional = true }
|
||||
prost = { version = "0.11", optional = true }
|
||||
serde = { version = "1.0", optional = true }
|
||||
serde_html_form = { version = "0.1", optional = true }
|
||||
serde_html_form = { version = "0.2.0", optional = true }
|
||||
serde_json = { version = "1.0.71", optional = true }
|
||||
tokio-stream = { version = "0.1.9", optional = true }
|
||||
tokio-util = { version = "0.7", optional = true }
|
||||
|
|
|
@ -53,7 +53,7 @@ tower-service = "0.3"
|
|||
|
||||
# optional dependencies
|
||||
axum-macros = { path = "../axum-macros", version = "0.3.3", optional = true }
|
||||
base64 = { version = "0.20", optional = true }
|
||||
base64 = { version = "0.21.0", optional = true }
|
||||
headers = { version = "0.3.7", optional = true }
|
||||
multer = { version = "2.0.0", optional = true }
|
||||
serde_json = { version = "1.0", features = ["raw_value"], optional = true }
|
||||
|
|
|
@ -670,10 +670,12 @@ impl From<Message> for Vec<u8> {
|
|||
}
|
||||
|
||||
fn sign(key: &[u8]) -> HeaderValue {
|
||||
use base64::engine::Engine as _;
|
||||
|
||||
let mut sha1 = Sha1::default();
|
||||
sha1.update(key);
|
||||
sha1.update(&b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"[..]);
|
||||
let b64 = Bytes::from(base64::encode(sha1.finalize()));
|
||||
let b64 = Bytes::from(base64::engine::general_purpose::STANDARD.encode(sha1.finalize()));
|
||||
HeaderValue::from_maybe_shared(b64).expect("base64 is a valid value")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue