pub struct Ptk {
pub ptk: Vec<u8>,
pub cipher: Cipher,
/* private fields */
}
Expand description
A PTK is derived from a PMK and provides access to the PTK’s key-hierarchy which yields a KEK, KCK, and TK, used for EAPOL frame protection, integrity check and unicast frame protection respectively.
Fields§
§ptk: Vec<u8>
§cipher: Cipher
Implementations§
Source§impl Ptk
impl Ptk
pub fn from_ptk(ptk: Vec<u8>, akm: &Akm, cipher: Cipher) -> Result<Self, Error>
pub fn new( pmk: &[u8], aa: &MacAddr, spa: &MacAddr, anonce: &[u8], snonce: &[u8], akm: &Akm, cipher: Cipher, ) -> Result<Ptk, Error>
pub fn kck(&self) -> &[u8] ⓘ
pub fn kek(&self) -> &[u8] ⓘ
pub fn tk(&self) -> &[u8] ⓘ
Trait Implementations§
impl StructuralPartialEq for Ptk
Auto Trait Implementations§
impl Freeze for Ptk
impl RefUnwindSafe for Ptk
impl Send for Ptk
impl Sync for Ptk
impl Unpin for Ptk
impl UnwindSafe for Ptk
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)