MCPcopy Create free account
hub / github.com/bcndev/bytecoin / clean_key

Method clean_key

src/platform/DBsqlite3.cpp:262–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262std::string DBsqliteKV::clean_key(const std::string &key) {
263 std::string result = key;
264 for (char &ch : result) {
265 unsigned char uch = ch;
266 if (uch >= 128)
267 uch -= 128;
268 if (uch == 127)
269 uch = 'F';
270 if (uch < 32)
271 uch = '0' + uch;
272 ch = uch;
273 }
274 return result;
275}
276
277void DBsqliteKV::delete_db(const std::string &path) {
278 auto ep = platform::expand_path(path);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected