]> git.stg.codes - stg.git/blobdiff - tests/test_crypto.cpp
Remove extra debug.
[stg.git] / tests / test_crypto.cpp
index 38a49fd87659e86c50bb1b0a064d01885301b0bc..902955cfae26c776dc22fd1114020ce1bded682a 100644 (file)
@@ -19,7 +19,7 @@ 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 %ld: 0x%x != 0x%x\n", i, a.P[i], b.P[i]);
@@ -30,7 +30,6 @@ bool equalCtx(const BLOWFISH_CTX& a, const BLOWFISH_CTX& b)
             if (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;