pub enum EncryptionDescriptor {
Unencrypted,
Symmetric {
scope: EncryptionScope,
algorithm: ContentAead,
nonce: [u8; 12],
},
Password {
scope: EncryptionScope,
algorithm: ContentAead,
nonce: [u8; 12],
key_wrap: PasswordKeyWrap,
},
Recipients {
scope: EncryptionScope,
algorithm: ContentAead,
nonce: [u8; 12],
recipients: Vec<RecipientKeyWrap>,
},
PasswordAndRecipients {
scope: EncryptionScope,
algorithm: ContentAead,
nonce: [u8; 12],
password: PasswordKeyWrap,
recipients: Vec<RecipientKeyWrap>,
},
}Variants§
Unencrypted
Symmetric
Password
Recipients
PasswordAndRecipients
Fields
§
scope: EncryptionScope§
algorithm: ContentAead§
password: PasswordKeyWrap§
recipients: Vec<RecipientKeyWrap>Implementations§
Source§impl EncryptionDescriptor
impl EncryptionDescriptor
pub fn is_header_encrypted(&self) -> bool
pub fn is_data_encrypted(&self) -> bool
pub fn encode(&self) -> Result<Vec<u8>, FramingError>
pub fn encode_with_extensions( &self, extensions: &[DescriptorExtension], ) -> Result<Vec<u8>, FramingError>
pub fn decode( bytes: &[u8], ) -> Result<(Self, Vec<DescriptorExtension>), FramingError>
Trait Implementations§
Source§impl Clone for EncryptionDescriptor
impl Clone for EncryptionDescriptor
Source§impl Debug for EncryptionDescriptor
impl Debug for EncryptionDescriptor
impl Eq for EncryptionDescriptor
Source§impl PartialEq for EncryptionDescriptor
impl PartialEq for EncryptionDescriptor
impl StructuralPartialEq for EncryptionDescriptor
Auto Trait Implementations§
impl Forget for EncryptionDescriptor
impl Freeze for EncryptionDescriptor
impl Move for EncryptionDescriptor
impl RefUnwindSafe for EncryptionDescriptor
impl Send for EncryptionDescriptorwhere
RawVecInner: Send,
impl Sync for EncryptionDescriptorwhere
RawVecInner: Sync,
impl Unpin for EncryptionDescriptor
impl UnsafeUnpin for EncryptionDescriptorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<RecipientKeyWrap>: UnsafeUnpin,
impl UnwindSafe for EncryptionDescriptorwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more