diff --git a/src/cloud.rs b/src/cloud.rs index ce7ef7f..43c3f32 100644 --- a/src/cloud.rs +++ b/src/cloud.rs @@ -40,13 +40,13 @@ struct Input { } impl Cloud { - pub const APP_ID: &str = "1010"; - pub const APP_KEY: &str = "ac21b9f9cbfe4ca5a88562ef25e2b768"; - pub const API_URL: &str = "https://mp-prod.appsmb.com/mas/v5/app/proxy?alias="; - pub const APP_VERSION: &str = "3.0.2"; - pub const SRC: &str = "10"; - pub const IOT_KEY: &str = "meicloud"; - pub const HMAC_KEY: &str = "PROD_VnoClJI9aikS8dyy"; + pub const APP_ID: &'static str = "1010"; + pub const APP_KEY: &'static str = "ac21b9f9cbfe4ca5a88562ef25e2b768"; + pub const API_URL: &'static str = "https://mp-prod.appsmb.com/mas/v5/app/proxy?alias="; + pub const APP_VERSION: &'static str = "3.0.2"; + pub const SRC: &'static str = "10"; + pub const IOT_KEY: &'static str = "meicloud"; + pub const HMAC_KEY: &'static str = "PROD_VnoClJI9aikS8dyy"; pub fn new(account: impl ToString, password: impl ToString) -> Result { let account = account.to_string(); diff --git a/src/security.rs b/src/security.rs index 8106cf8..e6dafe4 100644 --- a/src/security.rs +++ b/src/security.rs @@ -34,7 +34,7 @@ impl Security { const N: u128 = 141661095494369103254425781617665632877; const KEY: [u8; 16] = Self::N.to_be_bytes(); 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 { md5::compute([data, Self::SALT].concat()).to_vec()