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

Function cli_checksum_hex_nibble

src/cli/cli.c:7051–7062  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7049}
7050
7051static int cli_checksum_hex_nibble(unsigned char value) {
7052 if (value >= (unsigned char)'0' && value <= (unsigned char)'9') {
7053 return (int)(value - (unsigned char)'0');
7054 }
7055 if (value >= (unsigned char)'a' && value <= (unsigned char)'f') {
7056 return (int)(value - (unsigned char)'a') + 10;
7057 }
7058 if (value >= (unsigned char)'A' && value <= (unsigned char)'F') {
7059 return (int)(value - (unsigned char)'A') + 10;
7060 }
7061 return CLI_ERR;
7062}
7063
7064static bool cli_checksum_line_references_archive(const unsigned char *line, size_t line_length,
7065 const char *archive_name,

Callers 1

cli_checksum_line_digestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected