From 4339552fbb2257156ce5c5bf49da2614d7c5a9a9 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 17 Mar 2016 16:10:58 -0400 Subject: [PATCH] Flip the arguments to ExpectBytesEqual in poly1305_test. The function wants the expected value first. Change-Id: I6d3e21ebfa55d6dd99a34fe8380913641b4f5ff6 Reviewed-on: https://boringssl-review.googlesource.com/7501 Reviewed-by: Emily Stark (Dunn) Reviewed-by: David Benjamin --- crypto/poly1305/poly1305_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/poly1305/poly1305_test.cc b/crypto/poly1305/poly1305_test.cc index d970cd5a..2c25e93b 100644 --- a/crypto/poly1305/poly1305_test.cc +++ b/crypto/poly1305/poly1305_test.cc @@ -64,7 +64,7 @@ static bool TestSIMD(FileTest *t, unsigned excess, // |CRYPTO_poly1305_finish| requires a 16-byte-aligned output. alignas(16) uint8_t out[16]; CRYPTO_poly1305_finish(&state, out); - if (!t->ExpectBytesEqual(out, 16, mac.data(), mac.size())) { + if (!t->ExpectBytesEqual(mac.data(), mac.size(), out, 16)) { t->PrintLine("SIMD pattern %u failed.", excess); return false; } @@ -102,7 +102,7 @@ static bool TestPoly1305(FileTest *t, void *arg) { CRYPTO_poly1305_update(&state, &in[i], 1); } CRYPTO_poly1305_finish(&state, out); - if (!t->ExpectBytesEqual(out, 16, mac.data(), mac.size())) { + if (!t->ExpectBytesEqual(mac.data(), mac.size(), out, 16)) { t->PrintLine("Streaming Poly1305 failed."); return false; }