Lines Matching refs:cnt
302 size_t cnt; in sha256_crypt_r() local
376 for (cnt = key_len; cnt > 32; cnt -= 32) in sha256_crypt_r()
378 sha256_process_bytes(alt_result, cnt, &ctx); in sha256_crypt_r()
382 for (cnt = key_len; cnt; cnt >>= 1) in sha256_crypt_r()
383 if ((cnt & 1) != 0) in sha256_crypt_r()
395 for (cnt = 0; cnt < key_len; ++cnt) in sha256_crypt_r()
403 for (cnt = key_len; cnt >= 32; cnt -= 32) in sha256_crypt_r()
405 memcpy(cp, temp_result, cnt); in sha256_crypt_r()
411 for (cnt = 0; cnt < (size_t)16 + alt_result[0]; ++cnt) in sha256_crypt_r()
419 for (cnt = salt_len; cnt >= 32; cnt -= 32) in sha256_crypt_r()
421 memcpy(cp, temp_result, cnt); in sha256_crypt_r()
425 for (cnt = 0; cnt < rounds; ++cnt) { in sha256_crypt_r()
430 if ((cnt & 1) != 0) in sha256_crypt_r()
436 if (cnt % 3 != 0) in sha256_crypt_r()
440 if (cnt % 7 != 0) in sha256_crypt_r()
444 if ((cnt & 1) != 0) in sha256_crypt_r()
629 int cnt; in main() local
631 for (cnt = 0; cnt < (int)ntests; ++cnt) { in main()
633 sha256_process_bytes(tests[cnt].input, strlen(tests[cnt].input), &ctx); in main()
635 if (memcmp(tests[cnt].result, sum, 32) != 0) { in main()
636 printf("test %d run %d failed\n", cnt, 1); in main()
641 for (int i = 0; tests[cnt].input[i] != '\0'; ++i) in main()
642 sha256_process_bytes(&tests[cnt].input[i], 1, &ctx); in main()
644 if (memcmp(tests[cnt].result, sum, 32) != 0) { in main()
645 printf("test %d run %d failed\n", cnt, 2); in main()
661 printf("test %d failed\n", cnt); in main()
665 for (cnt = 0; cnt < ntests2; ++cnt) { in main()
666 char *cp = sha256_crypt(tests2[cnt].input, tests2[cnt].salt); in main()
668 if (strcmp(cp, tests2[cnt].expected) != 0) { in main()
670 cnt, tests2[cnt].expected, cp); in main()