Calling CRC functions from Lua

Does Wireshark provide an API for CRC calculations from Lua dissectors? I see Wireshark has many CRC functions in C; can they be called from Lua?

If they can't be called from Lua, are there good Lua bindings available for CRC calculations?

I've managed to build luagcrypt to call libgcrypt, and I am using that to do fast CRC-32 calculations. But libgcrypt doesn't have 16-bit CRCs such as CRC-CCITT. I found GitHub youlu-cn/luacrc16, but that doesn't support Lua 5.2.x which is in Wireshark 2.6.1.

cmcqueen1975's avatar
5
cmcqueen1975
asked 2018-06-05 23:58:45 +0000, updated 2018-06-18 02:03:37 +0000
edit flag offensive 0 remove flag close merge delete

Comments

Has anyone implemented this? I don't see no issue on gitlab. Should we make one?

yashi's avatar yashi (2022-07-19 04:44:39 +0000) edit
add a comment see more comments