MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / ta_hex

Function ta_hex

src/mcp/test_impact_artifact.c:36–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34static const yyjson_alc ta_yy_alc = {ta_yy_malloc, ta_yy_realloc, ta_yy_free, NULL};
35
36static bool ta_hex(const char *text, size_t want_a, size_t want_b) {
37 size_t n = text ? strlen(text) : 0;
38 if (n != want_a && n != want_b) {
39 return false;
40 }
41 for (size_t i = 0; i < n; i++) {
42 if (!((text[i] >= '0' && text[i] <= '9') || (text[i] >= 'a' && text[i] <= 'f'))) {
43 return false;
44 }
45 }
46 return true;
47}
48
49static void ta_hex_out(const uint8_t digest[CBM_SHA256_DIGEST_LEN], char hex[65]) {
50 static const char digits[] = "0123456789abcdef";

Callers 1

cbm_ti_receipt_readFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected