pub struct ReceiverMac {
pub key_id: u32,
pub mac: [u8; 16],
}Expand description
Receiver-specific MAC (spec §7.3.6.3 ReceiverSpecificMAC).
When a sender sends a ciphertext to N receivers with the same
suite but different keys, a 16-byte truncated HMAC is computed
per receiver. The wire representation is
a sequence of (key_id, mac) pairs in the SEC_POSTFIX.
key_id is the spec-conformant 4-byte ID (typically the low 32 bits
of the sender-side CryptoHandle for this receiver), by which
the receiver finds its specific MAC entry.
Fields§
§key_id: u324-byte CryptoTransformKeyId from §7.3.6.3.
mac: [u8; 16]16-byte truncated HMAC-SHA256 over the ciphertext.
Implementations§
Trait Implementations§
Source§impl Clone for ReceiverMac
impl Clone for ReceiverMac
Source§fn clone(&self) -> ReceiverMac
fn clone(&self) -> ReceiverMac
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 moreimpl Copy for ReceiverMac
Source§impl Debug for ReceiverMac
impl Debug for ReceiverMac
impl Eq for ReceiverMac
Source§impl Hash for ReceiverMac
impl Hash for ReceiverMac
Source§impl PartialEq for ReceiverMac
impl PartialEq for ReceiverMac
impl StructuralPartialEq for ReceiverMac
Auto Trait Implementations§
impl Freeze for ReceiverMac
impl RefUnwindSafe for ReceiverMac
impl Send for ReceiverMac
impl Sync for ReceiverMac
impl Unpin for ReceiverMac
impl UnsafeUnpin for ReceiverMac
impl UnwindSafe for ReceiverMac
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