pub struct SecurityContext<AEADBLKCIPH, KEYDESCLO> where
    AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
    KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>, 
{ pub euid: u64, pub frame_counter: u32, pub key_provider: KEYDESCLO, /* private fields */ }
Expand description

A context that used to keep track of cryptographic properties that are necessary for securing/unsecuring frames

AEAD is the type that will provide an AEAD instance to be used for the encryption/decryption process

NONCEGEN is the type that will convert the nonce created using the 802.15.4 standard into a nonce of the size that can be accepted by the provided AEAD algorithm

Fields

euid: u64

The EUID used for calculating the nonce of outgoing frames

frame_counter: u32

The current frame counter

key_provider: KEYDESCLO

The key descriptor lookup to use to look up keys

Implementations

Create a new security context using the provided key provider and frame counter

A security context that is not actually capable of providing any security

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Try to write to bytes using context. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.