class Key
Defined at line 269 of file ../../third_party/openthread/src/core/crypto/storage.hpp
Represents a crypto key.
The `Key` can represent a literal key (i.e., a pointer to a byte array containing the key along with a key length)
or a `KeyRef` (if `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled).
Public Methods
void Set (const uint8_t * aKeyBytes, uint16_t aKeyLength)
Sets the `Key` as a literal key from a given byte array and length.
Parameters
Defined at line 278 of file ../../third_party/openthread/src/core/crypto/storage.hpp
const uint8_t * GetBytes ()
Gets the pointer to the bye array containing the key.
If `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled and `IsKeyRef()` returns `true`, then this
method returns `nullptr`.
Defined at line 292 of file ../../third_party/openthread/src/core/crypto/storage.hpp
uint16_t GetLength ()
Gets the key length (number of bytes).
If `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` is enabled and `IsKeyRef()` returns `true`, then this
method returns zero.
Defined at line 303 of file ../../third_party/openthread/src/core/crypto/storage.hpp