[−][src]Struct bluetooth_mesh::net::EncryptedData
Holds the encrypted destination address, transport PDU and MIC.
Methods
impl<'_> EncryptedData<'_>
[src]
pub fn new(encrypted_data: &[u8], mic: MIC) -> EncryptedData
[src]
Panics
Panics if encrypted_data.len() <= ENCRYPTED_DATA_MIN_LEN
or encrypted_data.len() > ENCRYPTED_DATA_MAX_LEN
#[must_use]
pub const fn len(&self) -> usize
[src]
#[must_use]
pub const fn is_empty(&self) -> bool
[src]
#[must_use]
pub fn data(&self) -> &[u8]
[src]
encrypted DST and TransportPDU excluding MIC
#[must_use]
pub fn data_len(&self) -> usize
[src]
pub fn mic_size(&self) -> usize
[src]
#[must_use]
pub fn mic(&self) -> MIC
[src]
#[must_use]
pub fn packed_privacy_random(
&self,
dst: Address,
iv_index: IVIndex
) -> PackedPrivacy
[src]
&self,
dst: Address,
iv_index: IVIndex
) -> PackedPrivacy
#[must_use]
pub const fn max_len() -> usize
[src]
pub fn try_decrypt(
&self,
network_keys: &NetworkKeys,
nonce: &NetworkNonce
) -> Option<DecryptedData>
[src]
&self,
network_keys: &NetworkKeys,
nonce: &NetworkNonce
) -> Option<DecryptedData>
pub fn pack_into(&self, buffer: &mut [u8])
[src]
Panics
Panics if buffer.len() < self.len()
.
Trait Implementations
impl<'_> AsRef<[u8]> for EncryptedData<'_>
[src]
impl<'a> From<&'a OwnedEncryptedData> for EncryptedData<'a>
[src]
fn from(data: &'a OwnedEncryptedData) -> Self
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for EncryptedData<'a>
impl<'a> Send for EncryptedData<'a>
impl<'a> Sync for EncryptedData<'a>
impl<'a> Unpin for EncryptedData<'a>
impl<'a> UnwindSafe for EncryptedData<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,