pub struct CryptoHeader { /* private fields */ }Expand description
The header used by CCMP and GCMP cryptographic encapsulation.
This currently does not support WEP and TKIP.
Implementations§
Source§impl CryptoHeader
impl CryptoHeader
Sourcepub const MAX_KEY_ID: u8 = 3u8
pub const MAX_KEY_ID: u8 = 3u8
The largest representable key ID.
Sourcepub fn new(packet_number: u64, key_id: u8) -> Option<Self>
pub fn new(packet_number: u64, key_id: u8) -> Option<Self>
Create a new CryptoHeader.
Returns Option::None if packet_number is larger than Self::MAX_PN or key_id is
larger than Self::MAX_KEY_ID.
Sourcepub fn packet_number(&self) -> u64
pub fn packet_number(&self) -> u64
Get the packet number as a u64.
This will return a number between 0 and including Self::MAX_PN.
Sourcepub fn key_id(&self) -> u8
pub fn key_id(&self) -> u8
Get the key ID.
This will return a number between 0 and including Self::MAX_KEY_ID.
Trait Implementations§
Source§impl Clone for CryptoHeader
impl Clone for CryptoHeader
Source§fn clone(&self) -> CryptoHeader
fn clone(&self) -> CryptoHeader
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 CryptoHeader
impl Debug for CryptoHeader
Source§impl Default for CryptoHeader
impl Default for CryptoHeader
Source§fn default() -> CryptoHeader
fn default() -> CryptoHeader
Returns the “default value” for a type. Read more
Source§impl Format for CryptoHeader
impl Format for CryptoHeader
Source§impl Hash for CryptoHeader
impl Hash for CryptoHeader
Source§impl MeasureWith<()> for CryptoHeader
impl MeasureWith<()> for CryptoHeader
Source§fn measure_with(&self, _ctx: &()) -> usize
fn measure_with(&self, _ctx: &()) -> usize
How large is
Self, given the ctx?Source§impl Ord for CryptoHeader
impl Ord for CryptoHeader
Source§fn cmp(&self, other: &CryptoHeader) -> Ordering
fn cmp(&self, other: &CryptoHeader) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CryptoHeader
impl PartialEq for CryptoHeader
Source§impl PartialOrd for CryptoHeader
impl PartialOrd for CryptoHeader
Source§impl<'a> TryFromCtx<'a> for CryptoHeader
impl<'a> TryFromCtx<'a> for CryptoHeader
Source§impl TryIntoCtx for CryptoHeader
impl TryIntoCtx for CryptoHeader
impl Copy for CryptoHeader
impl Eq for CryptoHeader
impl StructuralPartialEq for CryptoHeader
Auto Trait Implementations§
impl Freeze for CryptoHeader
impl RefUnwindSafe for CryptoHeader
impl Send for CryptoHeader
impl Sync for CryptoHeader
impl Unpin for CryptoHeader
impl UnwindSafe for CryptoHeader
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