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) <estark@google.com> Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
parent
270f0a7761
commit
4339552fbb
@ -64,7 +64,7 @@ static bool TestSIMD(FileTest *t, unsigned excess,
|
|||||||
// |CRYPTO_poly1305_finish| requires a 16-byte-aligned output.
|
// |CRYPTO_poly1305_finish| requires a 16-byte-aligned output.
|
||||||
alignas(16) uint8_t out[16];
|
alignas(16) uint8_t out[16];
|
||||||
CRYPTO_poly1305_finish(&state, out);
|
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);
|
t->PrintLine("SIMD pattern %u failed.", excess);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ static bool TestPoly1305(FileTest *t, void *arg) {
|
|||||||
CRYPTO_poly1305_update(&state, &in[i], 1);
|
CRYPTO_poly1305_update(&state, &in[i], 1);
|
||||||
}
|
}
|
||||||
CRYPTO_poly1305_finish(&state, out);
|
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.");
|
t->PrintLine("Streaming Poly1305 failed.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user