Verify `data' checksum Returns true on success, false otherwise
| 87 | |
| 88 | // Verify `data' checksum Returns true on success, false otherwise |
| 89 | bool VerifyDataChecksum(const ChecksumIn& in, ChecksumType checksum_type) { |
| 90 | if (checksum_type == CHECKSUM_TYPE_NONE) { |
| 91 | return true; |
| 92 | } |
| 93 | const ChecksumHandler* handler = FindChecksumHandler(checksum_type); |
| 94 | if (NULL != handler) { |
| 95 | return handler->Verify(in); |
| 96 | } |
| 97 | return true; |
| 98 | } |
| 99 | |
| 100 | } // namespace brpc |
no test coverage detected