diff --git a/include/crc32c/crc32c.h b/include/crc32c/crc32c.h index e8a7817..7cdeb19 100644 --- a/include/crc32c/crc32c.h +++ b/include/crc32c/crc32c.h @@ -59,6 +59,13 @@ inline uint32_t Crc32c(const char* data, size_t count) { return Extend(0, reinterpret_cast(data), count); } +#ifdef __cpp_lib_byte +// Computes the CRC32C of "count" bytes in the buffer pointed by "data". +inline uint32_t Crc32c(const std::byte* data, size_t count) { + return Extend(0, reinterpret_cast(data), count); +} +#endif + // Computes the CRC32C of the string's content. inline uint32_t Crc32c(const std::string& string) { return Crc32c(reinterpret_cast(string.data()),