pub struct CxEncryption {
mask: u32,
offset: u32,
prolog_order: Vec<u8>,
odd_branch_order: Vec<u8>,
even_branch_order: Vec<u8>,
control_block: Arc<Vec<u32>>,
programs: Vec<Box<dyn ICxProgram + Send + Sync>>,
program_builder: Box<dyn ICxProgramBuilder + Send + Sync>,
base: BaseSchema,
}Available on crate features
kirikiri and kirikiri-arc only.Fields§
§mask: u32§offset: u32§prolog_order: Vec<u8>§odd_branch_order: Vec<u8>§even_branch_order: Vec<u8>§control_block: Arc<Vec<u32>>§programs: Vec<Box<dyn ICxProgram + Send + Sync>>§program_builder: Box<dyn ICxProgramBuilder + Send + Sync>§base: BaseSchemaImplementations§
Source§impl CxEncryption
impl CxEncryption
pub fn new( base: BaseSchema, schema: &CxSchema, filename: &str, ) -> Result<Arc<Self>>
fn new_inner( base: BaseSchema, schema: &CxSchema, filename: &str, program_builder: Box<dyn ICxProgramBuilder + Send + Sync>, ) -> Result<Self>
fn new_inner2( base: BaseSchema, schema: &CxSchema, program_builder: Box<dyn ICxProgramBuilder + Send + Sync>, control_block: Vec<u32>, ) -> Result<Self>
fn new_program(&self, seed: u32) -> Box<dyn ICxProgram + Send + Sync>
fn generate_program( &self, seed: u32, ) -> Result<Box<dyn ICxProgram + Send + Sync>>
fn read_tpm(tpm_path: &str, filename: &str) -> Result<Vec<u32>>
fn get_tpm_path(tpm_path: &str, filename: &str) -> Result<PathBuf>
fn emit_code( &self, program: &mut Box<dyn ICxProgram + Send + Sync>, stage: i32, ) -> bool
fn emit_body( &self, program: &mut Box<dyn ICxProgram + Send + Sync>, stage: i32, ) -> bool
fn emit_body2( &self, program: &mut Box<dyn ICxProgram + Send + Sync>, stage: i32, ) -> bool
fn emit_prolog(&self, program: &mut Box<dyn ICxProgram + Send + Sync>) -> bool
fn emit_even_branch( &self, program: &mut Box<dyn ICxProgram + Send + Sync>, ) -> bool
fn emit_odd_branch( &self, program: &mut Box<dyn ICxProgram + Send + Sync>, ) -> bool
fn execute_xcode(&self, hash: u32) -> Result<(u32, u32)>
Trait Implementations§
Source§impl AsRef<BaseSchema> for CxEncryption
impl AsRef<BaseSchema> for CxEncryption
Source§fn as_ref(&self) -> &BaseSchema
fn as_ref(&self) -> &BaseSchema
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<CxEncryption> for HxCrypt
impl AsRef<CxEncryption> for HxCrypt
Source§fn as_ref(&self) -> &CxEncryption
fn as_ref(&self) -> &CxEncryption
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Debug for CxEncryption
impl Debug for CxEncryption
Source§impl ICxEncryption for CxEncryption
impl ICxEncryption for CxEncryption
Auto Trait Implementations§
impl Freeze for CxEncryption
impl !RefUnwindSafe for CxEncryption
impl Send for CxEncryption
impl Sync for CxEncryption
impl Unpin for CxEncryption
impl !UnwindSafe for CxEncryption
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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