mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-08 04:29:54 +00:00
feat: added glue exports for kwm/qmc
This commit is contained in:
@@ -36,6 +36,18 @@ pub enum Cipher {
|
||||
V2(CipherV2),
|
||||
}
|
||||
|
||||
impl Cipher {
|
||||
pub fn decrypt<T>(&self, data: &mut T, offset: usize)
|
||||
where
|
||||
T: AsMut<[u8]> + ?Sized,
|
||||
{
|
||||
match self {
|
||||
Cipher::V1(cipher) => cipher.decrypt(data, offset),
|
||||
Cipher::V2(cipher) => cipher.decrypt(data, offset),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Header {
|
||||
pub magic: [u8; 0x10],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user