Merge branch 'master' into renovate/base64-0.x
All checks were successful
Midea Merge / Serial Reader (pull_request) Successful in 7m54s

This commit is contained in:
hodasemi 2024-01-15 13:07:03 +01:00
commit 4ce8592179
2 changed files with 8 additions and 8 deletions

View file

@ -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<Self> {
let account = account.to_string();

View file

@ -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<u8> {
md5::compute([data, Self::SALT].concat()).to_vec()