[kwm] refactor: rename cipher
to decipher
This commit is contained in:
parent
1e1d642149
commit
2222e7bc50
@ -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
|
||||
T: AsRef<[u8]>,
|
||||
{
|
||||
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user