pub struct CryptoService { /* private fields */ }Expand description
Cryptographic service for runtime security
Implementations§
Source§impl CryptoService
impl CryptoService
pub fn new() -> Self
Sourcepub fn generate_key(&self) -> u64
pub fn generate_key(&self) -> u64
Generate a new symmetric key
Sourcepub fn encrypt(&self, key_id: u64, data: &[u8]) -> Vec<u8> ⓘ
pub fn encrypt(&self, key_id: u64, data: &[u8]) -> Vec<u8> ⓘ
Encrypt data with XOR cipher (simplified)
Sourcepub fn decrypt(&self, key_id: u64, data: &[u8]) -> Vec<u8> ⓘ
pub fn decrypt(&self, key_id: u64, data: &[u8]) -> Vec<u8> ⓘ
Decrypt data with XOR cipher (simplified)
Sourcepub fn stats(&self) -> CryptoStats
pub fn stats(&self) -> CryptoStats
Get crypto statistics
Trait Implementations§
Source§impl Clone for CryptoService
impl Clone for CryptoService
Source§fn clone(&self) -> CryptoService
fn clone(&self) -> CryptoService
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CryptoService
impl RefUnwindSafe for CryptoService
impl Send for CryptoService
impl Sync for CryptoService
impl Unpin for CryptoService
impl UnwindSafe for CryptoService
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)