pub struct NtsAuthenticator {
pub nonce: Vec<u8>,
pub ciphertext: Vec<u8>,
}Expand description
NTS Authenticator and Encrypted Extensions extension field (RFC 8915 Section 5.6).
Contains the AEAD nonce and ciphertext. The ciphertext includes any encrypted extension fields plus the AEAD authentication tag.
Fields§
§nonce: Vec<u8>The AEAD nonce.
ciphertext: Vec<u8>The AEAD ciphertext (encrypted extensions + authentication tag).
Implementations§
Source§impl NtsAuthenticator
impl NtsAuthenticator
Sourcepub fn to_extension_field(&self) -> ExtensionField
pub fn to_extension_field(&self) -> ExtensionField
Convert to a generic extension field.
The value format is: nonce_length (u16) + nonce + ciphertext_length (u16) + ciphertext.
Sourcepub fn from_extension_field(ef: &ExtensionField) -> Result<Option<Self>>
pub fn from_extension_field(ef: &ExtensionField) -> Result<Option<Self>>
Try to extract from a generic extension field.
Sourcepub fn from_extension_field_buf(
ef: &ExtensionField,
) -> Result<Option<Self>, ParseError>
pub fn from_extension_field_buf( ef: &ExtensionField, ) -> Result<Option<Self>, ParseError>
Try to extract from a generic extension field without using std::io.
Trait Implementations§
Source§impl Clone for NtsAuthenticator
impl Clone for NtsAuthenticator
Source§fn clone(&self) -> NtsAuthenticator
fn clone(&self) -> NtsAuthenticator
Returns a duplicate 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 NtsAuthenticator
impl Debug for NtsAuthenticator
Source§impl PartialEq for NtsAuthenticator
impl PartialEq for NtsAuthenticator
impl Eq for NtsAuthenticator
impl StructuralPartialEq for NtsAuthenticator
Auto Trait Implementations§
impl Freeze for NtsAuthenticator
impl RefUnwindSafe for NtsAuthenticator
impl Send for NtsAuthenticator
impl Sync for NtsAuthenticator
impl Unpin for NtsAuthenticator
impl UnsafeUnpin for NtsAuthenticator
impl UnwindSafe for NtsAuthenticator
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