diff --git a/um_crypto/qmc/src/lib.rs b/um_crypto/qmc/src/lib.rs index 98f1b42..3a70048 100644 --- a/um_crypto/qmc/src/lib.rs +++ b/um_crypto/qmc/src/lib.rs @@ -35,6 +35,11 @@ impl QMCv2Cipher { Ok(cipher) } + pub fn new_from_ekey>(ekey_str: T) -> Result { + let key = ekey::decrypt(ekey_str)?; + Self::new(key) + } + pub fn decrypt(&self, data: &mut T, offset: usize) where T: AsMut<[u8]> + ?Sized,