pub struct PacketSecurityEnvelopeRef<'a> {
pub key_id: u32,
pub nonce: u64,
pub payload: &'a [u8],
pub tag: &'a [u8],
}Expand description
Borrowed packet security envelope decoded directly from wire bytes.
Fields§
§key_id: u32External key identifier chosen by the embedder.
nonce: u64Nonce scoped to key_id.
payload: &'a [u8]Borrowed ciphertext or plaintext payload.
tag: &'a [u8]Borrowed authentication tag.
Implementations§
Source§impl<'a> PacketSecurityEnvelopeRef<'a>
impl<'a> PacketSecurityEnvelopeRef<'a>
Sourcepub fn decode(
config: PacketSecurityConfig,
input: &'a [u8],
) -> Result<Self, PacketSecurityDecodeError>
pub fn decode( config: PacketSecurityConfig, input: &'a [u8], ) -> Result<Self, PacketSecurityDecodeError>
Decodes and validates an envelope without copying payload or tag bytes.
Trait Implementations§
Source§impl<'a> Clone for PacketSecurityEnvelopeRef<'a>
impl<'a> Clone for PacketSecurityEnvelopeRef<'a>
Source§fn clone(&self) -> PacketSecurityEnvelopeRef<'a>
fn clone(&self) -> PacketSecurityEnvelopeRef<'a>
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<'a> Copy for PacketSecurityEnvelopeRef<'a>
Source§impl<'a> Debug for PacketSecurityEnvelopeRef<'a>
impl<'a> Debug for PacketSecurityEnvelopeRef<'a>
impl<'a> Eq for PacketSecurityEnvelopeRef<'a>
Source§impl<'a> PartialEq for PacketSecurityEnvelopeRef<'a>
impl<'a> PartialEq for PacketSecurityEnvelopeRef<'a>
impl<'a> StructuralPartialEq for PacketSecurityEnvelopeRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for PacketSecurityEnvelopeRef<'a>
impl<'a> RefUnwindSafe for PacketSecurityEnvelopeRef<'a>
impl<'a> Send for PacketSecurityEnvelopeRef<'a>
impl<'a> Sync for PacketSecurityEnvelopeRef<'a>
impl<'a> Unpin for PacketSecurityEnvelopeRef<'a>
impl<'a> UnsafeUnpin for PacketSecurityEnvelopeRef<'a>
impl<'a> UnwindSafe for PacketSecurityEnvelopeRef<'a>
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