Skip to content

Commit

Permalink
Minor Update to Spake2pVerifier Serializer APIs (#15703)
Browse files Browse the repository at this point in the history
  • Loading branch information
emargolis authored and pull[bot] committed Feb 6, 2024
1 parent 99c2bc3 commit 6c45741
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/crypto/CHIPCryptoPAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::ComputeW0(uint8_t * w0out, size_t * w0
return CHIP_NO_ERROR;
}

CHIP_ERROR Spake2pVerifier::Serialize(MutableByteSpan & outSerialized)
CHIP_ERROR Spake2pVerifier::Serialize(MutableByteSpan & outSerialized) const
{
VerifyOrReturnError(outSerialized.size() >= kSpake2p_VerifierSerialized_Length, CHIP_ERROR_INVALID_ARGUMENT);

Expand All @@ -527,7 +527,7 @@ CHIP_ERROR Spake2pVerifier::Serialize(MutableByteSpan & outSerialized)
return CHIP_NO_ERROR;
}

CHIP_ERROR Spake2pVerifier::Deserialize(ByteSpan inSerialized)
CHIP_ERROR Spake2pVerifier::Deserialize(const ByteSpan & inSerialized)
{
VerifyOrReturnError(inSerialized.size() >= kSpake2p_VerifierSerialized_Length, CHIP_ERROR_INVALID_ARGUMENT);

Expand Down
4 changes: 2 additions & 2 deletions src/crypto/CHIPCryptoPAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -1252,8 +1252,8 @@ class Spake2pVerifier
uint8_t mW0[kP256_FE_Length];
uint8_t mL[kP256_Point_Length];

CHIP_ERROR Serialize(MutableByteSpan & outSerialized);
CHIP_ERROR Deserialize(ByteSpan inSerialized);
CHIP_ERROR Serialize(MutableByteSpan & outSerialized) const;
CHIP_ERROR Deserialize(const ByteSpan & inSerialized);

/**
* @brief Generate the Spake2+ verifier.
Expand Down

0 comments on commit 6c45741

Please sign in to comment.