mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
CHG: 'hf 15' - swapped crc impl to table based.
This commit is contained in:
parent
29c15b3480
commit
095b3af43b
4 changed files with 29 additions and 22 deletions
|
@ -73,6 +73,7 @@ void reset_table(void) {
|
|||
crc_type = CRC_NONE;
|
||||
}
|
||||
|
||||
// table lookup LUT solution
|
||||
uint16_t crc16_fast(uint8_t const *d, size_t n, uint16_t initval, bool refin, bool refout) {
|
||||
|
||||
// fast lookup table algorithm without augmented zero bytes, e.g. used in pkzip.
|
||||
|
@ -96,6 +97,7 @@ uint16_t crc16_fast(uint8_t const *d, size_t n, uint16_t initval, bool refin, bo
|
|||
return crc;
|
||||
}
|
||||
|
||||
// bit looped solution
|
||||
uint16_t update_crc16_ex( uint16_t crc, uint8_t c, uint16_t polynomial ) {
|
||||
uint16_t i, v, tmp = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue