diff --git a/um_crypto/kuwo/src/lib.rs b/um_crypto/kuwo/src/lib.rs index ef5affd..13f93d4 100644 --- a/um_crypto/kuwo/src/lib.rs +++ b/um_crypto/kuwo/src/lib.rs @@ -105,7 +105,7 @@ impl Header { }) } - pub fn get_cipher(&self, ekey: Option) -> Result + pub fn get_decipher(&self, ekey: Option) -> Result where T: AsRef<[u8]>, { diff --git a/um_wasm/src/exports/kuwo.rs b/um_wasm/src/exports/kuwo.rs index 68b2886..1e9d875 100644 --- a/um_wasm/src/exports/kuwo.rs +++ b/um_wasm/src/exports/kuwo.rs @@ -25,9 +25,9 @@ impl JsKuwoHeader { } /// Create an instance of cipher (decipher) for decryption - #[wasm_bindgen(js_name=makeCipher)] - pub fn make_cipher(&self, ekey: Option) -> Result { - let cipher = self.0.get_cipher(ekey).map_err(map_js_error)?; + #[wasm_bindgen(js_name=makeDecipher)] + pub fn make_decipher(&self, ekey: Option) -> Result { + let cipher = self.0.get_decipher(ekey).map_err(map_js_error)?; Ok(JsCipher(cipher)) } }