pub struct Airlock { /* private fields */ }Expand description
The Airlock — zero plaintext lifetime processing
All data processing happens within a closure. Plaintext exists ONLY inside the closure scope. The airlock:
- Allocates mlock’d memory (never swapped to disk)
- Decrypts data into the locked buffer
- Runs the processing closure
- Captures the encrypted output
- Zeroizes all plaintext memory on exit
Implementations§
Source§impl Airlock
impl Airlock
pub fn new(config: AirlockConfig) -> Self
pub fn with_defaults() -> Self
Sourcepub fn process<F, R>(
&self,
input: &[u8],
actor: &str,
jis_level: u8,
f: F,
) -> CortexResult<(R, AirlockSession)>
pub fn process<F, R>( &self, input: &[u8], actor: &str, jis_level: u8, f: F, ) -> CortexResult<(R, AirlockSession)>
Process data within the airlock. The closure receives plaintext and must return the processed result. All plaintext is wiped after the closure exits.
Returns: (processed_output, audit_session)
Sourcepub fn process_chunks<F, R>(
&self,
chunks: &[(Vec<u8>, u8)],
actor: &str,
actor_jis_level: u8,
f: F,
) -> CortexResult<(Vec<R>, AirlockSession)>
pub fn process_chunks<F, R>( &self, chunks: &[(Vec<u8>, u8)], actor: &str, actor_jis_level: u8, f: F, ) -> CortexResult<(Vec<R>, AirlockSession)>
Process multiple chunks, filtering by JIS level. Returns only chunks the actor is authorized to access.
Sourcepub fn audit_token(&self, session: &AirlockSession) -> TibetToken
pub fn audit_token(&self, session: &AirlockSession) -> TibetToken
Generate a TIBET audit token from an airlock session
Auto Trait Implementations§
impl Freeze for Airlock
impl RefUnwindSafe for Airlock
impl Send for Airlock
impl Sync for Airlock
impl Unpin for Airlock
impl UnsafeUnpin for Airlock
impl UnwindSafe for Airlock
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