Update Rust crate base64 to 0.21.7 #22
2 changed files with 8 additions and 8 deletions
14
src/cloud.rs
14
src/cloud.rs
|
@ -40,13 +40,13 @@ struct Input {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Cloud {
|
impl Cloud {
|
||||||
pub const APP_ID: &str = "1010";
|
pub const APP_ID: &'static str = "1010";
|
||||||
pub const APP_KEY: &str = "ac21b9f9cbfe4ca5a88562ef25e2b768";
|
pub const APP_KEY: &'static str = "ac21b9f9cbfe4ca5a88562ef25e2b768";
|
||||||
pub const API_URL: &str = "https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=";
|
pub const API_URL: &'static str = "https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=";
|
||||||
pub const APP_VERSION: &str = "3.0.2";
|
pub const APP_VERSION: &'static str = "3.0.2";
|
||||||
pub const SRC: &str = "10";
|
pub const SRC: &'static str = "10";
|
||||||
pub const IOT_KEY: &str = "meicloud";
|
pub const IOT_KEY: &'static str = "meicloud";
|
||||||
pub const HMAC_KEY: &str = "PROD_VnoClJI9aikS8dyy";
|
pub const HMAC_KEY: &'static str = "PROD_VnoClJI9aikS8dyy";
|
||||||
|
|
||||||
pub fn new(account: impl ToString, password: impl ToString) -> Result<Self> {
|
pub fn new(account: impl ToString, password: impl ToString) -> Result<Self> {
|
||||||
let account = account.to_string();
|
let account = account.to_string();
|
||||||
|
|
|
@ -34,7 +34,7 @@ impl Security {
|
||||||
const N: u128 = 141661095494369103254425781617665632877;
|
const N: u128 = 141661095494369103254425781617665632877;
|
||||||
const KEY: [u8; 16] = Self::N.to_be_bytes();
|
const KEY: [u8; 16] = Self::N.to_be_bytes();
|
||||||
const IV: [u8; 16] = [b'\0'; 16];
|
const IV: [u8; 16] = [b'\0'; 16];
|
||||||
const SALT: &[u8] = b"xhdiwjnchekd4d512chdjx5d8e4c394D2D7S";
|
const SALT: &'static [u8] = b"xhdiwjnchekd4d512chdjx5d8e4c394D2D7S";
|
||||||
|
|
||||||
pub fn encode32_data(data: &[u8]) -> Vec<u8> {
|
pub fn encode32_data(data: &[u8]) -> Vec<u8> {
|
||||||
md5::compute([data, Self::SALT].concat()).to_vec()
|
md5::compute([data, Self::SALT].concat()).to_vec()
|
||||||
|
|
Loading…
Reference in a new issue