sha256t.c: make sure unrolled loop is tested.
authorAndy Polyakov <appro@openssl.org>
Tue, 12 Jun 2012 14:40:41 +0000 (14:40 +0000)
committerAndy Polyakov <appro@openssl.org>
Tue, 12 Jun 2012 14:40:41 +0000 (14:40 +0000)
crypto/sha/sha256t.c

index 6b4a3bd001bafcda54208f8c6109a3e8298b078f..e1d34280aa0924fead00a0ec7ff960520e97e24e 100644 (file)
@@ -82,13 +82,17 @@ int main (int argc,char **argv)
 
     EVP_MD_CTX_init (&evp);
     EVP_DigestInit_ex (&evp,EVP_sha256(),NULL);
-    for (i=0;i<1000000;i+=160)
+    for (i=0;i<1000000;i+=288)
        EVP_DigestUpdate (&evp, "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
+                               "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
+                               "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
+                               "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
+                               "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
                                "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
                                "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
                                "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa"
                                "aaaaaaaa""aaaaaaaa""aaaaaaaa""aaaaaaaa",
-                               (1000000-i)<160?1000000-i:160);
+                               (1000000-i)<288?1000000-i:288);
     EVP_DigestFinal_ex (&evp,md,NULL);
     EVP_MD_CTX_cleanup (&evp);