Merge "Fix nonce uniqueness tests" into main am: 8d333ff410

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2758146

Change-Id: Ifc31204eaea700e50e8ac0601fa77911b590b65c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Ryan Prichard 2023-09-22 20:51:37 +00:00 committed by Automerger Merge Worker
commit 2abfe4abc7
2 changed files with 2 additions and 2 deletions

View file

@ -137,7 +137,7 @@ TEST_P(HmacKeySharingTest, ComputeSharedHmac) {
auto nonces = copyNonces(params);
EXPECT_EQ(allKeymasters().size(), nonces.size());
std::sort(nonces.begin(), nonces.end());
std::unique(nonces.begin(), nonces.end());
nonces.erase(std::unique(nonces.begin(), nonces.end()), nonces.end());
EXPECT_EQ(allKeymasters().size(), nonces.size());
auto responses = computeSharedHmac(allKeymasters(), params);

View file

@ -164,7 +164,7 @@ TEST_F(SharedSecretAidlTest, ComputeSharedSecret) {
auto nonces = copyNonces(params);
EXPECT_EQ(sharedSecrets.size(), nonces.size());
std::sort(nonces.begin(), nonces.end());
std::unique(nonces.begin(), nonces.end());
nonces.erase(std::unique(nonces.begin(), nonces.end()), nonces.end());
EXPECT_EQ(sharedSecrets.size(), nonces.size());
auto responses = computeAllSharedSecrets(params);