Add some fast CRC16 algorithms implementation (#2195)

* Add some fast CRC16 algorithms implementation

* Update ndpi_crc.c

* Move crc16 stuff to ndpi_analyze.c

* IEEE C37.118: use new fast CRC-16/CCITT-FALSE implementation
This commit is contained in:
Vladimir Gavrilov
2023-12-05 15:58:11 +01:00
committed by GitHub
parent be50493f44
commit 72601a69ff
4 changed files with 102 additions and 15 deletions
+3
View File
@@ -1796,6 +1796,9 @@ extern "C" {
/* ******************************* */
void ndpi_md5(const u_char *data, size_t data_len, u_char hash[16]);
u_int16_t ndpi_crc16_ccit(const void* data, size_t n_bytes);
u_int16_t ndpi_crc16_ccit_false(const void *data, size_t n_bytes);
u_int16_t ndpi_crc16_xmodem(const void *data, size_t n_bytes);
u_int32_t ndpi_crc32(const void* data, size_t n_bytes);
u_int32_t ndpi_nearest_power_of_two(u_int32_t x);