Skip to content

Commit

Permalink
Merge pull request #283 from serprex/master
Browse files Browse the repository at this point in the history
Update base64 from 0.13 to 0.21
  • Loading branch information
bradfier authored Jun 10, 2024
2 parents 536fa0e + 8247407 commit fa6ef63
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ssl = ["tiny_http/ssl"]
rustls = ["tiny_http/ssl-rustls"]

[dependencies]
base64 = "0.13"
base64 = "0.22"
brotli = { version = "3.3.2", optional = true }
chrono = { version = "0.4.19", default-features = false, features = ["clock"] }
filetime = "0.2.0"
Expand Down
4 changes: 2 additions & 2 deletions src/input/basic_http_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//! - In order to read a plain text body, see
//! [the `plain_text_body` function](fn.plain_text_body.html).

use base64;
use base64::{Engine as _, prelude::BASE64_STANDARD};
use Request;

/// Credentials returned by `basic_http_auth`.
Expand Down Expand Up @@ -73,7 +73,7 @@ pub fn basic_http_auth(request: &Request) -> Option<HttpAuthCredentials> {
return None;
}

let authvalue = match split.next().and_then(|val| base64::decode(val).ok()) {
let authvalue = match split.next().and_then(|val| BASE64_STANDARD.decode(val).ok()) {
Some(v) => v,
None => return None,
};
Expand Down
4 changes: 2 additions & 2 deletions src/websocket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub use self::websocket::Message;
pub use self::websocket::SendError;
pub use self::websocket::Websocket;

use base64;
use base64::{Engine as _, prelude::BASE64_STANDARD};
use sha1_smol::Sha1;
use std::borrow::Cow;
use std::error;
Expand Down Expand Up @@ -246,5 +246,5 @@ fn convert_key(input: &str) -> String {
sha1.update(input.as_bytes());
sha1.update(b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11");

base64::encode_config(&sha1.digest().bytes(), base64::STANDARD)
BASE64_STANDARD.encode(&sha1.digest().bytes())
}

0 comments on commit fa6ef63

Please sign in to comment.