ot::Mac::KeyMaterial::SetFrom() method
Sets the `KeyMaterial` from a given Key. If the `KeyMaterial` currently stores a valid `KeyRef`, the `SetFrom()` call will ensure to delete the previous one before creating and using a new `KeyRef` associated with the new `Key`.
Arguments
aKey
A reference to the new key.
aIsExportable
Boolean indicating if the key is exportable (this is only applicable under `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` config).