summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2012-06-12 14:40:41 +0000
committerAndy Polyakov <appro@openssl.org>2012-06-12 14:40:41 +0000
commit0bf8f110e0b6ef6161183bfeec18fc6a2d6945e7 (patch)
tree8cdddaa0b3aea55c4b75b588c9d641aeda4c054e /crypto
parentf3eac74bc54df29062896d9acd1891ba42328a93 (diff)
sha256t.c: make sure unrolled loop is tested.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/sha/sha256t.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/sha/sha256t.c b/crypto/sha/sha256t.c
index 6b4a3bd001..e1d34280aa 100644
--- a/crypto/sha/sha256t.c
+++ b/crypto/sha/sha256t.c
@@ -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);