Lines Matching refs:cnt
337 size_t cnt; in sha512_crypt_r() local
411 for (cnt = key_len; cnt > 64; cnt -= 64) in sha512_crypt_r()
413 sha512_process_bytes(alt_result, cnt, &ctx); in sha512_crypt_r()
417 for (cnt = key_len; cnt > 0; cnt >>= 1) in sha512_crypt_r()
418 if ((cnt & 1) != 0) in sha512_crypt_r()
430 for (cnt = 0; cnt < key_len; ++cnt) in sha512_crypt_r()
438 for (cnt = key_len; cnt >= 64; cnt -= 64) in sha512_crypt_r()
440 memcpy(cp, temp_result, cnt); in sha512_crypt_r()
446 for (cnt = 0; cnt < (size_t)16 + alt_result[0]; ++cnt) in sha512_crypt_r()
454 for (cnt = salt_len; cnt >= 64; cnt -= 64) in sha512_crypt_r()
456 memcpy(cp, temp_result, cnt); in sha512_crypt_r()
460 for (cnt = 0; cnt < rounds; ++cnt) { in sha512_crypt_r()
465 if ((cnt & 1) != 0) in sha512_crypt_r()
471 if (cnt % 3 != 0) in sha512_crypt_r()
475 if (cnt % 7 != 0) in sha512_crypt_r()
479 if ((cnt & 1) != 0) in sha512_crypt_r()
696 int cnt; in main() local
698 for (cnt = 0; cnt < (int)ntests; ++cnt) { in main()
700 sha512_process_bytes(tests[cnt].input, strlen(tests[cnt].input), &ctx); in main()
702 if (memcmp(tests[cnt].result, sum, 64) != 0) { in main()
703 printf("test %d run %d failed\n", cnt, 1); in main()
708 for (int i = 0; tests[cnt].input[i] != '\0'; ++i) in main()
709 sha512_process_bytes(&tests[cnt].input[i], 1, &ctx); in main()
711 if (memcmp(tests[cnt].result, sum, 64) != 0) { in main()
712 printf("test %d run %d failed\n", cnt, 2); in main()
730 printf("test %d failed\n", cnt); in main()
734 for (cnt = 0; cnt < ntests2; ++cnt) { in main()
735 char *cp = sha512_crypt(tests2[cnt].input, tests2[cnt].salt); in main()
737 if (strcmp(cp, tests2[cnt].expected) != 0) { in main()
739 cnt, tests2[cnt].expected, cp); in main()