CRYPTO-C v1.1.3
C/C++ Documentation
crc16.h File Reference

Go to the source code of this file.

#include "utildev.h"

Detailed Description

CRC16 hash function support.

Param Value
Alias "XMODEM", "ZMODEM", "CRC-16/ACORN"
Check 0x31c3 (crc16 of "123456789")
Poly 0x1021
Init 0x0000
RefIn false
RefOut false
XorOut 0x0000

Macros

#define CRC16LEN   2
 16-bit CRC16 digest length in bytes
 

Functions

uint16_t crc16 (void *in, size_t inlen)
 Compute CRC16 on inlen bytes of in. More...
 

Function Documentation

◆ crc16()

uint16_t crc16 ( void *  in,
size_t  inlen 
)

Compute CRC16 on inlen bytes of in.

Parameters
inPointer to data to hash
inlenLength in bytes of in data
Returns
16-bit unsigned integer result of CRC16 hash.

16-bit CRC table