Skip to main content

Module combine

Module combine 

Source

Constantsยง

POLY ๐Ÿ”’

Staticsยง

X2N_TABLE ๐Ÿ”’

Functionsยง

combine ๐Ÿ”’
fold_keys ๐Ÿ”’
The constants that fold a 128-bit accumulator forward by bits bits with two carry-less multiplies: (x^(bits + 32), x^(bits - 32)) modulo p(x), reflected, as 33-bit values (the K1..K4 of specialized/pclmulqdq.rs, which a test checks).
multiply ๐Ÿ”’
shift ๐Ÿ”’
Appends the zero bytes table was built for to the CRC state state.
shift_table ๐Ÿ”’
Builds tables that append len zero bytes to a CRC state a byte at a time: the new state is the XOR of table[k][(state >> (8 * k)) & 0xFF] for k in 0..4.
x8n ๐Ÿ”’
Returns x^(8 * len) modulo p(x), reflected. Multiplying a CRC state by it appends len zero bytes.