Lines Matching refs:cnt

69 	size_t salt_len, key_len, cnt, rounds;  in crypt_sha512()  local
127 for (cnt = key_len; cnt > 64; cnt -= 64) in crypt_sha512()
129 SHA512_Update(&ctx, alt_result, cnt); in crypt_sha512()
133 for (cnt = key_len; cnt > 0; cnt >>= 1) in crypt_sha512()
134 if ((cnt & 1) != 0) in crypt_sha512()
146 for (cnt = 0; cnt < key_len; ++cnt) in crypt_sha512()
154 for (cnt = key_len; cnt >= 64; cnt -= 64) { in crypt_sha512()
158 memcpy(cp, temp_result, cnt); in crypt_sha512()
164 for (cnt = 0; cnt < 16 + alt_result[0]; ++cnt) in crypt_sha512()
172 for (cnt = salt_len; cnt >= 64; cnt -= 64) { in crypt_sha512()
176 memcpy(cp, temp_result, cnt); in crypt_sha512()
180 for (cnt = 0; cnt < rounds; ++cnt) { in crypt_sha512()
185 if ((cnt & 1) != 0) in crypt_sha512()
191 if (cnt % 3 != 0) in crypt_sha512()
195 if (cnt % 7 != 0) in crypt_sha512()
199 if ((cnt & 1) != 0) in crypt_sha512()
390 int i, cnt; in main() local
392 for (cnt = 0; cnt < (int)ntests; ++cnt) { in main()
394 SHA512_Update(&ctx, tests[cnt].input, strlen(tests[cnt].input)); in main()
396 if (memcmp(tests[cnt].result, sum, 64) != 0) { in main()
397 printf("test %d run %d failed\n", cnt, 1); in main()
402 for (i = 0; tests[cnt].input[i] != '\0'; ++i) in main()
403 SHA512_Update(&ctx, &tests[cnt].input[i], 1); in main()
405 if (memcmp(tests[cnt].result, sum, 64) != 0) { in main()
406 printf("test %d run %d failed\n", cnt, 2); in main()
426 printf("test %d failed\n", cnt); in main()
430 for (cnt = 0; cnt < ntests2; ++cnt) { in main()
431 char *cp = crypt_sha512(tests2[cnt].input, tests2[cnt].salt); in main()
433 if (strcmp(cp, tests2[cnt].expected) != 0) { in main()
435 cnt, tests2[cnt].expected, cp); in main()