X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/5e4339fa861d8f6aadf5cd731e8c38dd569aa013..646c8fd6c0112573ba2aae7f165f5d48e849831e:/tests/test_crypto.cpp?ds=sidebyside diff --git a/tests/test_crypto.cpp b/tests/test_crypto.cpp index bf4ecde3..902955cf 100644 --- a/tests/test_crypto.cpp +++ b/tests/test_crypto.cpp @@ -19,18 +19,17 @@ namespace bool equalCtx(const BLOWFISH_CTX& a, const BLOWFISH_CTX& b) { - for (size_t i = 0; i < sizeof(a.P); ++i) + for (size_t i = 0; i < 18; ++i) if (a.P[i] != b.P[i]) { - //printf("Failed for P at %d: 0%x != 0%x\n", i, a.P[i], b.P[i]); + printf("Failed for P at %ld: 0x%x != 0x%x\n", i, a.P[i], b.P[i]); return false; } for (size_t i = 0; i < 4; ++i) for (size_t j = 0; j < 256; ++j) if (a.S[i][j] != b.S[i][j]) { - //printf("Failed for S at %d, %d: 0%x != 0%x\n", i, j, a.S[i][j], b.S[i][j]); - + printf("Failed for S at %ld, %ld: 0x%x != 0x%x\n", i, j, a.S[i][j], b.S[i][j]); return false; } return true;