pub enum Encrypt<'a> {
Dh([u8; 32], &'a Vec<[u8; 32]>),
Hmac([u8; 32], [u8; 32], usize),
Session([u8; 32]),
}Expand description
encapsulates the parameters and mode for encryption.
Variants§
Dh([u8; 32], &'a Vec<[u8; 32]>)
generates random content key and encrypts for all recipients with their respective DH shared secret.
Hmac([u8; 32], [u8; 32], usize)
hashes the second tuple member, with the first tuple member as the hash key.
Session([u8; 32])
uses the key that is passed in without modification.
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Encrypt<'a>
impl<'a> Send for Encrypt<'a>
impl<'a> Sync for Encrypt<'a>
impl<'a> Unpin for Encrypt<'a>
impl<'a> UnwindSafe for Encrypt<'a>
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