Skip to content

Commit 727e5a4

Browse files
authored
update base64 to 0.20.0 (#1173)
1 parent 262562e commit 727e5a4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sdk/iot_hub/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ rust-version = "1.64.0"
1010
[dependencies]
1111
async-trait = "0.1"
1212
azure_core = { path = "../core", version = "0.7", default_features = false }
13-
base64 = "0.13"
13+
base64 = "0.20"
1414
bytes = "1.0"
1515
time = "0.3.10"
1616
hmac = "0.12"

sdk/iot_hub/src/service/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use azure_core::{
55
auth::TokenCredential, prelude::Timeout, ClientOptions, CollectedResponse, Context, Method,
66
Pipeline, Request, Response, TimeoutPolicy, Url,
77
};
8-
use base64::{decode, encode_config};
8+
use base64::{decode, encode};
99
use hmac::{Hmac, Mac};
1010
use sha2::Sha256;
1111
use std::sync::Arc;
@@ -131,7 +131,7 @@ impl ServiceClient {
131131

132132
hmac.update(data.as_bytes());
133133
let result = hmac.finalize();
134-
let sas_token: &str = &encode_config(result.into_bytes(), base64::STANDARD);
134+
let sas_token: &str = &encode(result.into_bytes());
135135

136136
let encoded: String = url::form_urlencoded::Serializer::new(String::new())
137137
.append_pair("sr", &format!("{}.azure-devices.net", iot_hub_name))

0 commit comments

Comments
 (0)