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:
@@ -105,7 +105,7 @@ impl Header {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_cipher<T>(&self, ekey: Option<T>) -> Result<Cipher>
|
pub fn get_decipher<T>(&self, ekey: Option<T>) -> Result<Cipher>
|
||||||
where
|
where
|
||||||
T: AsRef<[u8]>,
|
T: AsRef<[u8]>,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ impl JsKuwoHeader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Create an instance of cipher (decipher) for decryption
|
/// Create an instance of cipher (decipher) for decryption
|
||||||
#[wasm_bindgen(js_name=makeCipher)]
|
#[wasm_bindgen(js_name=makeDecipher)]
|
||||||
pub fn make_cipher(&self, ekey: Option<String>) -> Result<JsCipher, JsError> {
|
pub fn make_decipher(&self, ekey: Option<String>) -> Result<JsCipher, JsError> {
|
||||||
let cipher = self.0.get_cipher(ekey).map_err(map_js_error)?;
|
let cipher = self.0.get_decipher(ekey).map_err(map_js_error)?;
|
||||||
Ok(JsCipher(cipher))
|
Ok(JsCipher(cipher))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user