mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-07 20:19:51 +00:00
[kwm] refactor: rename cipher to decipher
This commit is contained in:
@@ -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<String>) -> Result<JsCipher, JsError> {
|
||||
let cipher = self.0.get_cipher(ekey).map_err(map_js_error)?;
|
||||
#[wasm_bindgen(js_name=makeDecipher)]
|
||||
pub fn make_decipher(&self, ekey: Option<String>) -> Result<JsCipher, JsError> {
|
||||
let cipher = self.0.get_decipher(ekey).map_err(map_js_error)?;
|
||||
Ok(JsCipher(cipher))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user