pub trait BaseORAM: Send {
// Required methods
fn read(&mut self, block_id: i64) -> Vec<u8> ⓘ;
fn write(&mut self, block_id: i64, data: Bytes) -> usize;
fn size(&self) -> i64;
fn name(&self) -> String;
fn args(&self) -> &ORAMConfig;
// Provided methods
fn test_state(&mut self) -> bool { ... }
fn init(&mut self) { ... }
fn cleanup(&mut self) { ... }
fn post_op(&mut self) { ... }
fn node_filename(&self, i: i64) -> String { ... }
fn node_path(&self, i: i64) -> String { ... }
}
Expand description
Base trait for an ORAM scheme
Required Methods§
Sourcefn read(&mut self, block_id: i64) -> Vec<u8> ⓘ
fn read(&mut self, block_id: i64) -> Vec<u8> ⓘ
Read block with id block_id
and return the bytes read
Sourcefn write(&mut self, block_id: i64, data: Bytes) -> usize
fn write(&mut self, block_id: i64, data: Bytes) -> usize
Write bytes in data
inside of block with id block_id
.
Return the number of bytes written.
Sourcefn args(&self) -> &ORAMConfig
fn args(&self) -> &ORAMConfig
Return the CLI arguments
Provided Methods§
fn test_state(&mut self) -> bool
Sourcefn node_filename(&self, i: i64) -> String
fn node_filename(&self, i: i64) -> String
Return the filename of the node with given number