Struct bc_components::SealedMessage
source · pub struct SealedMessage { /* private fields */ }Expand description
A sealed message can be sent to anyone, but only the intended recipient can decrypt it.
Implementations§
source§impl SealedMessage
impl SealedMessage
sourcepub fn new<D>(plaintext: D, recipient: &PublicKeyBase) -> Selfwhere
D: AsRef<[u8]>,
pub fn new<D>(plaintext: D, recipient: &PublicKeyBase) -> Selfwhere D: AsRef<[u8]>,
Creates a new SealedMessage from the given plaintext and recipient.
sourcepub fn new_with_aad<D>(
plaintext: D,
recipient: &PublicKeyBase,
aad: Option<&[u8]>
) -> Selfwhere
D: AsRef<[u8]>,
pub fn new_with_aad<D>( plaintext: D, recipient: &PublicKeyBase, aad: Option<&[u8]> ) -> Selfwhere D: AsRef<[u8]>,
Creates a new SealedMessage from the given plaintext, recipient, and
additional authenticated data.
sourcepub fn new_opt<D, N>(
plaintext: D,
recipient: &PublicKeyBase,
aad: Option<&[u8]>,
test_key_material: Option<&[u8]>,
test_nonce: Option<N>
) -> Selfwhere
D: AsRef<[u8]>,
N: AsRef<Nonce>,
pub fn new_opt<D, N>( plaintext: D, recipient: &PublicKeyBase, aad: Option<&[u8]>, test_key_material: Option<&[u8]>, test_nonce: Option<N> ) -> Selfwhere D: AsRef<[u8]>, N: AsRef<Nonce>,
Creates a new SealedMessage from the given plaintext, recipient, and
additional authenticated data. Also accepts optional test key material
and test nonce.
Trait Implementations§
source§impl CBORDecodable for SealedMessage
impl CBORDecodable for SealedMessage
source§impl CBOREncodable for SealedMessage
impl CBOREncodable for SealedMessage
source§impl CBORTagged for SealedMessage
impl CBORTagged for SealedMessage
source§impl CBORTaggedDecodable for SealedMessage
impl CBORTaggedDecodable for SealedMessage
source§fn from_untagged_cbor(cbor: &CBOR) -> Result<Self, Error>
fn from_untagged_cbor(cbor: &CBOR) -> Result<Self, Error>
Creates an instance of this type by decoding it from untagged CBOR.
source§fn from_tagged_cbor(cbor: &CBOR) -> Result<Self, Error>where
Self: Sized,
fn from_tagged_cbor(cbor: &CBOR) -> Result<Self, Error>where Self: Sized,
Creates an instance of this type by decoding it from tagged CBOR.
source§impl CBORTaggedEncodable for SealedMessage
impl CBORTaggedEncodable for SealedMessage
source§fn untagged_cbor(&self) -> CBOR
fn untagged_cbor(&self) -> CBOR
Returns the untagged CBOR encoding of this instance.
source§fn tagged_cbor(&self) -> CBOR
fn tagged_cbor(&self) -> CBOR
Returns the tagged CBOR encoding of this instance.
source§impl Clone for SealedMessage
impl Clone for SealedMessage
source§fn clone(&self) -> SealedMessage
fn clone(&self) -> SealedMessage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for SealedMessage
impl Debug for SealedMessage
source§impl PartialEq<SealedMessage> for SealedMessage
impl PartialEq<SealedMessage> for SealedMessage
source§fn eq(&self, other: &SealedMessage) -> bool
fn eq(&self, other: &SealedMessage) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl URDecodable for SealedMessage
impl URDecodable for SealedMessage
source§impl UREncodable for SealedMessage
impl UREncodable for SealedMessage
impl CBORCodable for SealedMessage
impl CBORTaggedCodable for SealedMessage
impl Eq for SealedMessage
impl StructuralEq for SealedMessage
impl StructuralPartialEq for SealedMessage
impl URCodable for SealedMessage
Auto Trait Implementations§
impl RefUnwindSafe for SealedMessage
impl Send for SealedMessage
impl Sync for SealedMessage
impl Unpin for SealedMessage
impl UnwindSafe for SealedMessage
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