mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
style
This commit is contained in:
parent
698b41eb27
commit
403385c56c
1 changed files with 13 additions and 2 deletions
|
@ -268,12 +268,20 @@ static size_t removeEm410xParity(uint8_t *bits, size_t startIdx, bool isLong, bo
|
|||
*validLong = false;
|
||||
uint8_t bLen = isLong ? 110 : 55;
|
||||
uint16_t parityCol[4] = { 0, 0, 0, 0 };
|
||||
|
||||
for (int word = 0; word < bLen; word += 5) {
|
||||
for (int bit = 0; bit < 5; bit++) {
|
||||
if (word + bit >= bLen) break;
|
||||
|
||||
if (word + bit >= bLen) {
|
||||
break;
|
||||
}
|
||||
|
||||
parityWd = (parityWd << 1) | bits[startIdx + word + bit];
|
||||
if ((word <= 50) && (bit < 4))
|
||||
|
||||
if ((word <= 50) && (bit < 4)) {
|
||||
parityCol[bit] = (parityCol[bit] << 1) | bits[startIdx + word + bit];
|
||||
}
|
||||
|
||||
bits[bitCnt++] = (bits[startIdx + word + bit]);
|
||||
}
|
||||
if (word + 5 > bLen) break;
|
||||
|
@ -293,12 +301,15 @@ static size_t removeEm410xParity(uint8_t *bits, size_t startIdx, bool isLong, bo
|
|||
if (!isLong && validRowParitySkipColP && validColParity) {
|
||||
*validShort = true;
|
||||
}
|
||||
|
||||
if (isLong && validRowParity) {
|
||||
*validLong = true;
|
||||
}
|
||||
|
||||
if (isLong && validRowParitySkipColP && validColParity) {
|
||||
*validShortExtended = true;
|
||||
}
|
||||
|
||||
if (*validShort || *validShortExtended || *validLong) {
|
||||
return bitCnt;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue