mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-07 20:19:51 +00:00
feat: qrc file support
This commit is contained in:
@@ -29,6 +29,7 @@ umc_kuwo = { path = "../um_crypto/kuwo" }
|
||||
umc_mg3d = { path = "../um_crypto/mg3d" }
|
||||
umc_ncm = { path = "../um_crypto/ncm" }
|
||||
umc_qmc = { path = "../um_crypto/qmc" }
|
||||
umc_qrc = { path = "../um_crypto/qrc" }
|
||||
umc_qtfm = { path = "../um_crypto/qtfm" }
|
||||
umc_xiami = { path = "../um_crypto/xiami" }
|
||||
umc_xmly = { path = "../um_crypto/xmly" }
|
||||
|
||||
@@ -5,6 +5,7 @@ pub mod kuwo;
|
||||
pub mod mg3d;
|
||||
pub mod ncm;
|
||||
pub mod qmc;
|
||||
mod qrc;
|
||||
pub mod qtfm;
|
||||
pub mod xiami;
|
||||
pub mod xmly;
|
||||
|
||||
14
um_wasm/src/exports/qrc.rs
Normal file
14
um_wasm/src/exports/qrc.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use wasm_bindgen::prelude::wasm_bindgen;
|
||||
use wasm_bindgen::JsError;
|
||||
|
||||
/// QRC Decrypt ("*.qrc" cache file)
|
||||
#[wasm_bindgen(js_name=decryptQRCFile)]
|
||||
pub fn js_decrypt_qrc(buffer: &mut [u8]) -> Result<Vec<u8>, JsError> {
|
||||
umc_qrc::decrypt_qrc_file(buffer).map_err(JsError::from)
|
||||
}
|
||||
|
||||
/// QRC Decrypt (network response)
|
||||
#[wasm_bindgen(js_name=decryptQRCNetwork)]
|
||||
pub fn js_decrypt_qrc_network(buffer: &str) -> Result<Vec<u8>, JsError> {
|
||||
umc_qrc::decrypt_qrc_network(buffer).map_err(JsError::from)
|
||||
}
|
||||
Reference in New Issue
Block a user