pub struct EncryptedMessage {
pub content_type: ContentType,
pub recipient_key_id: KeyId,
pub content_algorithm: ContentAlgorithm,
pub parties: KdfParties,
/* private fields */
}Expand description
A strictly decoded (not yet opened) seal-only message.
Fields§
§content_type: ContentTypeThe plaintext content type from the protected header.
recipient_key_id: KeyIdThe recipient static key id this message is sealed to.
content_algorithm: ContentAlgorithmThe content-encryption algorithm.
parties: KdfPartiesThe KDF party identities from the recipient protected header.
Implementations§
Source§impl EncryptedMessage
impl EncryptedMessage
Sourcepub async fn open<R: Recipient>(
&self,
recipient: &R,
aad: &ExternalAad,
expected_parties: Option<&KdfParties>,
) -> Result<Opened, OpenError>
pub async fn open<R: Recipient>( &self, recipient: &R, aad: &ExternalAad, expected_parties: Option<&KdfParties>, ) -> Result<Opened, OpenError>
Open this message with recipient, binding aad, optionally pinning
the KDF party identities.
§Errors
OpenError::RecipientKeyMismatch when the message is addressed to
a different key; OpenError::PartyMismatch when pinned parties
disagree with the wire; OpenError::OpenFailed (opaque) on any
authentication failure.
Trait Implementations§
Source§impl Clone for EncryptedMessage
impl Clone for EncryptedMessage
Source§fn clone(&self) -> EncryptedMessage
fn clone(&self) -> EncryptedMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§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 EncryptedMessage
impl RefUnwindSafe for EncryptedMessage
impl Send for EncryptedMessage
impl Sync for EncryptedMessage
impl Unpin for EncryptedMessage
impl UnsafeUnpin for EncryptedMessage
impl UnwindSafe for EncryptedMessage
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