[−][src]Enum kuska_sodiumoxide::crypto::secretstream::xchacha20poly1305::Tag
A tag is encrypted and attached to each message before the authentication
code is generated over all data. A typical encrypted stream simply attaches
0
as a tag to all messages, except the last one which is tagged as
Tag::Final
. When decrypting the tag is retrieved and may be used.
Variants
Message, the most common tag, that doesn't add any information about the nature of the message.
Push: indicates that the message marks the end of a set of messages, but not the end of the stream. For example, a huge JSON string sent as multiple chunks can use this tag to indicate to the application that the string is complete and that it can be decoded. But the stream itself is not closed, and more data may follow.
Rekey: "forget" the key used to encrypt this message and the previous ones, and derive a new secret key.
Final: indicates that the message marks the end of the stream and erases the secret key used to encrypt the previous sequence.
Trait Implementations
impl Clone for Tag
[src]
impl Copy for Tag
[src]
impl Debug for Tag
[src]
impl PartialEq<Tag> for Tag
[src]
pub fn eq(&self, other: &Tag) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for Tag
[src]
Auto Trait Implementations
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,