2 32-bit Cyclic Redundancy Check
6 #ifndef LUA_LIBA_CRC32_H
7 #define LUA_LIBA_CRC32_H
12 32-bit Cyclic Redundancy Check
13 @field table Cyclic Redundancy Check comparison table
16 #if defined(__cplusplus)
18 #endif /* __cplusplus */
21 constructor for 32-bit Cyclic Redundancy Check
22 @tparam integer poly polynomial that is CRC's divisor
23 @tparam boolean reversed whether or not to reverse
24 @treturn a.crc32 32-bit Cyclic Redundancy Check userdata
27 int liba_crc32_new(lua_State
*L
);
30 generate for 32-bit Cyclic Redundancy Check
31 @tparam integer poly polynomial that is CRC's divisor
32 @tparam boolean reversed whether or not to reverse
33 @treturn a.crc32 32-bit Cyclic Redundancy Check userdata
36 int liba_crc32_gen(lua_State
*L
);
39 calculate for 32-bit Cyclic Redundancy Check
40 @tparam string block block to be processed
41 @tparam integer value initial value
42 @treturn integer output value
45 int liba_crc32_eval(lua_State
*L
);
48 pack a block and its 32-bit Cyclic Redundancy Check value
49 @tparam string block block to be processed
50 @tparam integer value initial value
51 @treturn string packed block
54 int liba_crc32_pack(lua_State
*L
);
56 #if defined(__cplusplus)
58 #endif /* __cplusplus */