Skip to content

Commit

Permalink
Pin code is used in the endian mode of the processor (#5726) (#5730)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjzander-signify authored Mar 31, 2021
1 parent a2d7cbe commit 3c345cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/transport/PASESession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ CHIP_ERROR PASESession::Init(uint16_t myKeyId, uint32_t setupCode, SessionEstabl
CHIP_ERROR PASESession::ComputePASEVerifier(uint32_t setUpPINCode, uint32_t pbkdf2IterCount, const uint8_t * salt, size_t saltLen,
PASEVerifier & verifier)
{
return pbkdf2_sha256(reinterpret_cast<const uint8_t *>(&setUpPINCode), sizeof(setUpPINCode), salt, saltLen, pbkdf2IterCount,
uint8_t littleEndianSetupPINCode[sizeof(uint32_t)];
Encoding::LittleEndian::Put32(littleEndianSetupPINCode, setUpPINCode);

return pbkdf2_sha256(littleEndianSetupPINCode, sizeof(littleEndianSetupPINCode), salt, saltLen, pbkdf2IterCount,
sizeof(PASEVerifier), &verifier[0][0]);
}

Expand Down

0 comments on commit 3c345cd

Please sign in to comment.