| 6 | #define BASE_METRICS_CRC32_H_ |
| 7 |
| 8 | #include <stddef.h> |
| 9 | #include <stdint.h> |
| 10 |
| 11 | #include "base/base_export.h" |
| 12 |
| 13 | namespace base { |
| 14 |
| 15 | BASE_EXPORT extern const uint32_t kCrcTable[256]; |
| 16 |
| 17 | // This provides a simple, fast CRC-32 calculation that can be used for checking |
| 18 | // the integrity of data. It is not a "secure" calculation! |sum| can start |
| 19 | // with any seed or be used to continue an operation began with previous data. |
| 20 | BASE_EXPORT uint32_t Crc32(uint32_t sum, const void* data, size_t size); |
| 21 |
| 22 | } // namespace base |
| 23 |
| 24 | #endif // BASE_METRICS_CRC32_H_ |
| 25 |