pub struct AesMasterKey(/* private fields */);Expand description
The AesMasterKey is used to derive unique single-use encrypt keys for
encrypting or decrypting a blob.
RootSeed – derive(“vfs master key”) –> AesMasterKey
Implementations§
Source§impl AesMasterKey
impl AesMasterKey
pub fn new(root_seed_derived_secret: &[u8; 32]) -> Self
pub fn encrypt<R: Crng>( &self, rng: &mut R, aad: &[&[u8]], data_size_hint: Option<usize>, write_data_cb: &dyn Fn(&mut Vec<u8>), ) -> Vec<u8> ⓘ
pub fn decrypt( &self, aad: &[&[u8]], data: Vec<u8>, ) -> Result<Vec<u8>, DecryptError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AesMasterKey
impl RefUnwindSafe for AesMasterKey
impl Send for AesMasterKey
impl Sync for AesMasterKey
impl Unpin for AesMasterKey
impl UnsafeUnpin for AesMasterKey
impl UnwindSafe for AesMasterKey
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