From 54320022534acf1d3a7b4cc92d14ef800b1e0aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Sun, 15 Sep 2024 16:32:07 +0100 Subject: [PATCH] [wasm] chore: use new key method --- um_wasm/src/exports/qmc.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/um_wasm/src/exports/qmc.rs b/um_wasm/src/exports/qmc.rs index 43219bf..5268490 100644 --- a/um_wasm/src/exports/qmc.rs +++ b/um_wasm/src/exports/qmc.rs @@ -19,8 +19,7 @@ impl JsQMC2 { /// Create a new QMC2 (mgg/mflac) cipher instance. #[wasm_bindgen(constructor)] pub fn new(ekey: &str) -> Result { - let key = umc_qmc::ekey::decrypt(ekey).map_err(map_js_error)?; - let cipher = QMCv2Cipher::new(key).map_err(map_js_error)?; + let cipher = QMCv2Cipher::new_from_ekey(ekey).map_err(map_js_error)?; Ok(JsQMC2(cipher)) }