diff --git a/crates/algorithms/algorithms-c/src/crc/crc32.c b/crates/algorithms/algorithms-c/src/crc/crc32.c index 9deb710..cfcd686 100755 --- a/crates/algorithms/algorithms-c/src/crc/crc32.c +++ b/crates/algorithms/algorithms-c/src/crc/crc32.c @@ -52,7 +52,7 @@ Crc32 crc32_new() { crc32.buf = 0; return crc32; } -void crc32_process(const char *data, size_t len, Crc32 *crc32) { +void crc32_process(const uint8_t *data, size_t len, Crc32 *crc32) { #define chksum crc32->buf chksum = CRC32_INIT; for (uint32_t i = 0; i < len; i++) { @@ -63,7 +63,7 @@ void crc32_process(const char *data, size_t len, Crc32 *crc32) { return; } -ChecksumCrc32 crc32_checksum(const void *data, uint32_t len) { +ChecksumCrc32 crc32_checksum(const uint8_t *data, uint32_t len) { Crc32 crc32 = crc32_new(); crc32_process(data, len, &crc32); return crc32.buf; diff --git a/crates/algorithms/algorithms-c/src/crc/crc32.h b/crates/algorithms/algorithms-c/src/crc/crc32.h index e3dc719..ecc60ae 100755 --- a/crates/algorithms/algorithms-c/src/crc/crc32.h +++ b/crates/algorithms/algorithms-c/src/crc/crc32.h @@ -16,8 +16,8 @@ typedef struct Crc32 { } Crc32; Crc32 crc32_new(); -void crc32_process(const char *data, size_t len, Crc32 *crc32); +void crc32_process(const uint8_t *data, size_t len, Crc32 *crc32); -ChecksumCrc32 crc32_checksum(const void *data, uint32_t len); +ChecksumCrc32 crc32_checksum(const uint8_t *data, uint32_t len); #endif // CRC32_H