Skip to content

Commit

Permalink
Address review comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple committed Mar 24, 2022
1 parent 6fad1e0 commit 348c0e1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/controller/CommissioningWindowOpener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,8 @@ CHIP_ERROR CommissioningWindowOpener::OpenCommissioningWindow(NodeId deviceId, S
}
else
{
// What size should we use?
constexpr size_t saltLength = (kSpake2p_Min_PBKDF_Salt_Length + kSpake2p_Max_PBKDF_Salt_Length) / 2;
ReturnErrorOnFailure(DRBG_get_bytes(mPBKDFSaltBuffer, saltLength));
mPBKDFSalt = ByteSpan(mPBKDFSaltBuffer, saltLength);
ReturnErrorOnFailure(DRBG_get_bytes(mPBKDFSaltBuffer, sizeof(mPBKDFSaltBuffer)));
mPBKDFSalt = ByteSpan(mPBKDFSaltBuffer);
}

mSetupPayload.version = 0;
Expand Down

0 comments on commit 348c0e1

Please sign in to comment.