mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 03:07:47 +00:00
[key-manager] add Pskc::Clear() method (#4315)
This commit is contained in:
committed by
Jonathan Hui
parent
56d3a469b2
commit
57f5044c9a
@@ -84,7 +84,7 @@ KeyManager::KeyManager(Instance &aInstance)
|
||||
, mIsPskcSet(false)
|
||||
{
|
||||
mMasterKey = static_cast<const MasterKey &>(kDefaultMasterKey);
|
||||
memset(&mPskc, 0, sizeof(mPskc));
|
||||
mPskc.Clear();
|
||||
ComputeKey(mKeySequence, mKey);
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,12 @@ OT_TOOL_PACKED_BEGIN
|
||||
class Pskc : public otPskc
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* This method clears the PSKc (sets all bytes to zero).
|
||||
*
|
||||
*/
|
||||
void Clear(void) { memset(this, 0, sizeof(*this)); }
|
||||
|
||||
/**
|
||||
* This method evaluates whether or not the Thread PSKc values match.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user