MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / generate_fingerprint

Function generate_fingerprint

tools/comdb2ar/serialise.cpp:736–751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

734}
735
736std::string generate_fingerprint(void)
737{
738 unsigned char obuf[20];
739
740 std::string dt_string = getDTString();
741
742 // SHA the date time to get a pseudorandom fingerprint to check increment order
743 SHA1((unsigned char *) dt_string.c_str(), dt_string.length() + 1, obuf);
744
745 std::ostringstream ss;
746 for(int i = 0; i < 20; ++i){
747 ss << std::hex << std::setw(2) << std::setfill('0') << +obuf[i];
748 }
749
750 return ss.str();
751}
752
753void serialise_database(
754 std::string lrlpath,

Callers 2

serialise_databaseFunction · 0.85
create_partialsFunction · 0.85

Calls 1

getDTStringFunction · 0.85

Tested by

no test coverage detected