MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / test

Function test

src/common/sha2/sha2.cpp:761–780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759#include <stdlib.h>
760
761void test(const char *vector, unsigned char *digest, unsigned int digest_size)
762{
763 char output[2 * SHA_MAX_DIGEST_SIZE + 1];
764 int i;
765
766 output[2 * digest_size] = '\0';
767
768 for (i = 0; i < (int) digest_size ; i++)
769 {
770 sprintf(output + 2 * i, "%02x", digest[i]);
771 }
772
773 printf("H: %s\n", output);
774
775 if (strcmp(vector, output))
776 {
777 fprintf(stderr, "Test failed.\n");
778 exit(EXIT_FAILURE);
779 }
780}
781
782using namespace Firebird;
783

Callers 10

mainFunction · 0.70
get_undo_dataFunction · 0.50
verb_postFunction · 0.50
mergeToMethod · 0.50
fetch_pageMethod · 0.50
garbage_collectMethod · 0.50
walk_indexMethod · 0.50
MetaNameMethod · 0.50
MetaNameClass · 0.50
internalGetRecordMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected