MCPcopy Create free account
hub / github.com/apache/brpc / ComputeDataChecksum

Function ComputeDataChecksum

src/brpc/checksum.cpp:78–86  ·  view source on GitHub ↗

Compute `data' checksum

Source from the content-addressed store, hash-verified

76
77// Compute `data' checksum
78void ComputeDataChecksum(const ChecksumIn& in, ChecksumType checksum_type) {
79 if (checksum_type == CHECKSUM_TYPE_NONE) {
80 return;
81 }
82 const ChecksumHandler* handler = FindChecksumHandler(checksum_type);
83 if (NULL != handler) {
84 handler->Compute(in);
85 }
86}
87
88// Verify `data' checksum Returns true on success, false otherwise
89bool VerifyDataChecksum(const ChecksumIn& in, ChecksumType checksum_type) {

Callers 1

SerializeRpcMessageFunction · 0.85

Calls 1

FindChecksumHandlerFunction · 0.85

Tested by

no test coverage detected