MCPcopy Create free account
hub / github.com/Tencent/phxsql / GetCheckSum

Method GetCheckSum

phxcomm/utils/phx_utils.cpp:44–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44uint64_t Utils::GetCheckSum(const uint64_t &old_checksum, const char *value, const size_t &value_size) {
45 uint64_t checksum = old_checksum;
46 for (size_t i = 0; i < value_size; ++i) {
47 checksum = checksum * 257 + value[i];
48 }
49 return checksum;
50}
51
52void Utils::CheckDir(const string &dir) {
53 size_t pos = 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected