aboutsummaryrefslogtreecommitdiff
path: root/src/hash/bsdchecksum.h
blob: 8e41893a22aedc1eb6559286c9e0345c126a98fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "../lua.h"
#include <stdint.h>

/**
 * calculates a bsdchecksum of (len) bytes
 *
 * @param {uint8_t*} input bytes
 * @param {size_t} input length
 * @return {uint16_t} 16 bit checksum
*/
uint16_t i_bsdchecksum(uint8_t*, size_t);

int l_bsdchecksum(lua_State*);