Module cerlc

A configurable cyclic redundancy check (CRC) generator.

Description

A configurable cyclic redundancy check (CRC) generator

Function Index

calc_crc/2 Calculate the CRC of a binary or list of data bytes, using the CRC definition generated by init/1.
init/1 Generate a record containing the CRC calculation function and associated configuration values, for the given CRC algorithm definition.

Function Details

calc_crc/2

calc_crc(Data::binary() | list(), Cerlc::#cerlc{init_value = non_neg_integer(), final_xor_value = non_neg_integer(), crc_fun = function(), table = tuple(), shift = non_neg_integer(), mask = non_neg_integer()}) -> non_neg_integer()

Calculate the CRC of a binary or list of data bytes, using the CRC definition generated by init/1

init/1

init(CrcDef::atom() | tuple()) -> #cerlc{init_value = non_neg_integer(), final_xor_value = non_neg_integer(), crc_fun = function(), table = tuple(), shift = non_neg_integer(), mask = non_neg_integer()}

Generate a record containing the CRC calculation function and associated configuration values, for the given CRC algorithm definition


Generated by EDoc