mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-08 04:29:54 +00:00
[qmc] feat: add helper method to create QMCv2 Decipher from EKey
This commit is contained in:
@@ -35,6 +35,11 @@ impl QMCv2Cipher {
|
||||
Ok(cipher)
|
||||
}
|
||||
|
||||
pub fn new_from_ekey<T: AsRef<[u8]>>(ekey_str: T) -> Result<Self> {
|
||||
let key = ekey::decrypt(ekey_str)?;
|
||||
Self::new(key)
|
||||
}
|
||||
|
||||
pub fn decrypt<T>(&self, data: &mut T, offset: usize)
|
||||
where
|
||||
T: AsMut<[u8]> + ?Sized,
|
||||
|
||||
Reference in New Issue
Block a user