whitecatboard / Lua-RTOS-ESP32

Lua RTOS for ESP32
Other
1.19k stars 221 forks source link

added lua crc module #251

Closed the0ne closed 5 years ago

the0ne commented 5 years ago

added support for generating crc8 crc16 crc32

crc.crc8("foobar")
crc.crc16("foobar")
crc.crc32("foobar")

second parameter (optional) is the crc's "start" value which is -1 by default for each of the above, so crc.crc8("foobar") is the same as crc.crc8("foobar", 0xFF)

depending on requirements, a different crc can be generated using the second parameter, e.g. crc.crc8("foobar", 0)