pub struct NwkSEncKey(/* private fields */);Expand description
Network session encryption key (LoRaWAN 1.1).
Encrypts FOpts MAC commands and FRMPayload with FPort = 0.
See crate::Data::encrypt_fopts.
Implementations§
Source§impl NwkSEncKey
impl NwkSEncKey
Sourcepub const fn from_slice(s: &[u8]) -> Result<Self>
pub const fn from_slice(s: &[u8]) -> Result<Self>
Construct from a slice, validating the length.
§Errors
Returns Error::InvalidKeyLength when the slice is not 16 bytes.
Source§impl NwkSEncKey
impl NwkSEncKey
Sourcepub fn from_hex(s: &str) -> Result<Self>
pub fn from_hex(s: &str) -> Result<Self>
Construct from a hex string (32 hex chars for 16 bytes).
§Errors
Error::Hex if the input is not valid hex.
Error::InvalidKeyLength if the decoded byte length is not 16.
Sourcepub fn from_base64(s: &str) -> Result<Self>
pub fn from_base64(s: &str) -> Result<Self>
Construct from a standard base64 string.
§Errors
Error::Base64 if the input is not valid base64.
Error::InvalidKeyLength if the decoded byte length is not 16.
Trait Implementations§
Source§impl Clone for NwkSEncKey
impl Clone for NwkSEncKey
Source§fn clone(&self) -> NwkSEncKey
fn clone(&self) -> NwkSEncKey
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 moreSource§impl Debug for NwkSEncKey
impl Debug for NwkSEncKey
Source§impl<'de> Deserialize<'de> for NwkSEncKey
Available on crate feature serde only.
impl<'de> Deserialize<'de> for NwkSEncKey
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Drop for NwkSEncKey
impl Drop for NwkSEncKey
Source§impl Hash for NwkSEncKey
impl Hash for NwkSEncKey
Source§impl PartialEq for NwkSEncKey
impl PartialEq for NwkSEncKey
Source§fn eq(&self, other: &NwkSEncKey) -> bool
fn eq(&self, other: &NwkSEncKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NwkSEncKey
Available on crate feature serde only.
impl Serialize for NwkSEncKey
Available on crate feature
serde only.Source§impl Zeroize for NwkSEncKey
impl Zeroize for NwkSEncKey
impl Eq for NwkSEncKey
impl StructuralPartialEq for NwkSEncKey
Auto Trait Implementations§
impl Freeze for NwkSEncKey
impl RefUnwindSafe for NwkSEncKey
impl Send for NwkSEncKey
impl Sync for NwkSEncKey
impl Unpin for NwkSEncKey
impl UnsafeUnpin for NwkSEncKey
impl UnwindSafe for NwkSEncKey
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