#[repr(C)]pub struct CxParams {
pub even_branch_perm: [u8; 8],
pub odd_branch_perm: [u8; 6],
pub prologue_perm: [u8; 3],
pub flags: u8,
pub mask: u16,
pub offset: u16,
}kirikiri and kirikiri-arc only.Expand description
Represents the configuration parameters for the WAMSOFT Cx encryption scheme.
This structure corresponds to the 0x20-byte memory block found at ecx + 0x3020
(or passed to CxLoadParams). It contains the permutation tables for VM instruction
generation, algorithm selection flags, and encryption constants.
Fields§
§even_branch_perm: [u8; 8]The permutation table for the “Even” branch of the VM code generation.
Maps to EvenBranchOrder on GarBRO (Case 0-7).
odd_branch_perm: [u8; 6]The permutation table for the “Odd” branch of the VM code generation.
Maps to OddBranchOrder on GarBRO (Case 0-5).
prologue_perm: [u8; 3]The permutation table for the Prologue of the VM code generation.
Maps to PrologOrder on GarBRO (Case 0-2).
flags: u8Configuration flags.
- Bit 7 (0x80): Random Algorithm Type (0 = Xoroshiro128PlusPlus, 1 = Xoroshiro128StarStar).
- Bit 0 (0x01): ControlBlock generate mode (0 => NOP, 1 => XOR)
mask: u16The encryption mask used in the key calculation.
offset: u16The encryption offset used in the key calculation.
Implementations§
Trait Implementations§
Source§impl StructUnpack for CxParams
impl StructUnpack for CxParams
impl Copy for CxParams
Auto Trait Implementations§
impl Freeze for CxParams
impl RefUnwindSafe for CxParams
impl Send for CxParams
impl Sync for CxParams
impl Unpin for CxParams
impl UnwindSafe for CxParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more