pub struct WorKeys { /* private fields */ }Expand description
The integrity and encryption keys of one end device’s wake-on-radio frames.
Implementations§
Source§impl WorKeys
impl WorKeys
Sourcepub fn derive(root_wor_s_key: &[u8; 16], dev_addr: u32) -> WorKeys
pub fn derive(root_wor_s_key: &[u8; 16], dev_addr: u32) -> WorKeys
Derives an end device’s keys from its root relay session key, TS011-1.0.1 section 4.5.
WorSIntKey = aes128_encrypt(RootWorSKey, 0x01 | DevAddr | pad16) and
WorSEncKey = aes128_encrypt(RootWorSKey, 0x02 | DevAddr | pad16).
§Arguments
root_wor_s_key- the device’s root relay session key.dev_addr- the device’s address.
§Returns
The two keys.
Sourcepub const fn integrity(&self) -> &[u8; 16]
pub const fn integrity(&self) -> &[u8; 16]
Returns the key a WOR frame’s and a WOR ACK’s integrity code is computed with,
WorSIntKey.
§Returns
The key.
Sourcepub const fn encryption(&self) -> &[u8; 16]
pub const fn encryption(&self) -> &[u8; 16]
Trait Implementations§
impl Copy for WorKeys
impl Eq for WorKeys
impl StructuralPartialEq for WorKeys
Auto Trait Implementations§
impl Freeze for WorKeys
impl RefUnwindSafe for WorKeys
impl Send for WorKeys
impl Sync for WorKeys
impl Unpin for WorKeys
impl UnsafeUnpin for WorKeys
impl UnwindSafe for WorKeys
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