mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-07 20:19:51 +00:00
impl: kuwo cipher and bodian info
This commit is contained in:
@@ -15,6 +15,7 @@ pub enum QmcCryptoError {
|
||||
QMCV2MapKeyEmpty,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
pub enum QMCv2Cipher {
|
||||
MapL(QMC2Map),
|
||||
RC4(QMC2RC4),
|
||||
|
||||
@@ -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],
|
||||
}
|
||||
|
||||
@@ -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]>,
|
||||
|
||||
Reference in New Issue
Block a user