pub struct JSIntKey(/* private fields */);Expand description
Join Server integrity key (LoRaWAN 1.1).
MIC key for Join Accept and Rejoin Type 1. Derived from NwkKey and
DevEui via crate::JoinServerKeys::derive.
Implementations§
Source§impl JSIntKey
impl JSIntKey
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 JSIntKey
impl JSIntKey
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<'de> Deserialize<'de> for JSIntKey
Available on crate feature serde only.
impl<'de> Deserialize<'de> for JSIntKey
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
impl Eq for JSIntKey
impl StructuralPartialEq for JSIntKey
Auto Trait Implementations§
impl Freeze for JSIntKey
impl RefUnwindSafe for JSIntKey
impl Send for JSIntKey
impl Sync for JSIntKey
impl Unpin for JSIntKey
impl UnsafeUnpin for JSIntKey
impl UnwindSafe for JSIntKey
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