pub struct Sealed {
pub counter: u64,
pub tag: [u8; 16],
}Expand description
The out-of-band header of a sealed message: the counter that orders it and the tag that authenticates it.
Both values travel alongside the ciphertext to the peer. The peer needs the counter to rebuild the nonce and to reject replays, and the tag to verify the message was not altered.
Fields§
§counter: u64The monotonically increasing counter naming this message within the session.
tag: [u8; 16]The 16-byte ChaCha20-Poly1305 tag over the ciphertext and its associated data.
Trait Implementations§
impl Copy for Sealed
impl Eq for Sealed
impl StructuralPartialEq for Sealed
Auto Trait Implementations§
impl Freeze for Sealed
impl RefUnwindSafe for Sealed
impl Send for Sealed
impl Sync for Sealed
impl Unpin for Sealed
impl UnsafeUnpin for Sealed
impl UnwindSafe for Sealed
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