impl: kuwo cipher and bodian info

This commit is contained in:
鲁树人
2024-09-06 23:03:28 +01:00
parent 7429c0d167
commit e7d8231474
8 changed files with 193 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ pub enum QmcCryptoError {
QMCV2MapKeyEmpty,
}
#[derive(Debug, PartialEq, Clone)]
pub enum QMCv2Cipher {
MapL(QMC2Map),
RC4(QMC2RC4),

View File

@@ -4,6 +4,7 @@ use crate::v1::cipher::{qmc1_transform, V1_KEY_SIZE};
use crate::v2_map::key::key_compress;
use anyhow::Result;
#[derive(Debug, PartialEq, Clone)]
pub struct QMC2Map {
key: [u8; V1_KEY_SIZE],
}

View File

@@ -7,7 +7,7 @@ const FIRST_SEGMENT_SIZE: usize = 0x0080;
const OTHER_SEGMENT_SIZE: usize = 0x1400;
const RC4_STREAM_CACHE_SIZE: usize = OTHER_SEGMENT_SIZE + 512;
#[derive(Debug, Clone)]
#[derive(Debug, PartialEq, Clone)]
pub struct QMC2RC4 {
hash: f64,
key: Box<[u8]>,