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

Function instance_key_valid

src/daemon/ipc.c:184–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184static bool instance_key_valid(const char *key) {
185 if (!key) {
186 return false;
187 }
188 for (size_t i = 0; i < 16; i++) {
189 char ch = key[i];
190 bool decimal = ch >= '0' && ch <= '9';
191 bool lower = ch >= 'a' && ch <= 'f';
192 if (!decimal && !lower) {
193 return false;
194 }
195 }
196 return key[16] == '\0';
197}
198
199static char *string_copy(const char *value) {
200 if (!value) {

Calls

no outgoing calls

Tested by

no test coverage detected