class KeyTrio
Defined at line 652 of file ../../third_party/openthread/src/core/mac/mac_types.hpp
Represents a trio of MAC keys (previous, current, and next) and their associated key index.
Public Methods
void Clear ()
Clears the stored keys and key index.
const KeyMaterial & GetKey (Type aType)
Gets a MAC key of a given type from the trio.
Parameters
Defined at line 679 of file ../../third_party/openthread/src/core/mac/mac_types.hpp
uint8_t GetKeyIndex ()
Gets the MAC key index.
Defined at line 686 of file ../../third_party/openthread/src/core/mac/mac_types.hpp
const KeyMaterial & SelectKey (uint8_t aKeyIndex)
Selects the MAC key from the trio for a given key index.
This method always returns a valid key. If the given key index matches the current, previous, or next key index
in the trio, the corresponding key material is returned. If the given key index does not match any of these,
the current key material is returned by default. This is a safety precaution to ensure that any frame with
security enabled is encrypted using a valid key.
Parameters
Enumerations
enum Type : uint8_t
| Name | Value | Comments |
|---|---|---|
| kPrev | 0 |
Previous MAC key. |
| kCur | 1 |
Current MAC key. |
| kNext | 2 |
Next MAC key. |
Represents the key type (previous, current, or next).
Defined at line 660 of file ../../third_party/openthread/src/core/mac/mac_types.hpp
Friends
class SubMac