Lines Matching refs:alg

683 MDInput(const Algorithm_t *alg, FILE *f, char *buf, bool tee)  in MDInput()  argument
693 alg->Init(&context); in MDInput()
700 alg->Update(&context, block, len); in MDInput()
710 alg->Update(&context, "\n", 1); in MDInput()
720 alg->Update(&context, p, q - p); in MDInput()
738 alg->Update(&context, &byte, 1); in MDInput()
747 alg->End(&context, buf); in MDInput()
753 alg->Update(&context, "\n", 1); in MDInput()
757 return (alg->End(&context, buf)); in MDInput()
764 MDOutput(const Algorithm_t *alg, char *p, const char *name) in MDOutput() argument
789 strncmp(alg->name, "SHA512t", 7) == 0) { in MDOutput()
790 printf("%.6s/%s", alg->name, alg->name + 7); in MDOutput()
792 printf("%s", alg->name); in MDOutput()
812 MDTimeTrial(const Algorithm_t *alg) in MDTimeTrial() argument
823 alg->name, TEST_BLOCK_COUNT, TEST_BLOCK_LEN); in MDTimeTrial()
834 alg->Init(&context); in MDTimeTrial()
836 alg->Update(&context, block, TEST_BLOCK_LEN); in MDTimeTrial()
837 p = alg->End(&context, buf); in MDTimeTrial()
999 MDTestSuite(const Algorithm_t *alg) in MDTestSuite() argument
1004 printf("%s test suite:\n", alg->name); in MDTestSuite()
1006 (*alg->Data)(MDTestInput[i], strlen(MDTestInput[i]), buffer); in MDTestSuite()
1007 printf("%s (\"%s\") = %s", alg->name, MDTestInput[i], buffer); in MDTestSuite()
1008 if (strcmp(buffer, (*alg->TestOutput)[i]) == 0) { in MDTestSuite()
1018 usage(const Algorithm_t *alg) in usage() argument
1023 fprintf(stderr, "usage: %ssum [-bctwz] [files ...]\n", alg->progname); in usage()
1030 alg->progname); in usage()