mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
style
This commit is contained in:
parent
e84f3bb467
commit
796fdb9085
1 changed files with 6 additions and 7 deletions
|
@ -90,7 +90,7 @@ static void pacRawToCardId(uint8_t* outCardId, const uint8_t* rawBytes) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// convert 8 bytes of PAC_8byte ID to 16 byte array of raw data (FF204990XX...)
|
// convert 8 bytes of PAC_8byte ID to 16 byte array of raw data (FF204990XX...)
|
||||||
static void pacCardIdToRaw(uint8_t* outRawBytes, const char* cardId) {
|
static void pacCardIdToRaw(uint8_t *outRawBytes, const char *cardId) {
|
||||||
uint8_t idbytes[10];
|
uint8_t idbytes[10];
|
||||||
|
|
||||||
// prepend PAC_8byte card type "20"
|
// prepend PAC_8byte card type "20"
|
||||||
|
@ -116,8 +116,7 @@ static void pacCardIdToRaw(uint8_t* outRawBytes, const char* cardId) {
|
||||||
pattern = reflect8(idbytes[i - 2]);
|
pattern = reflect8(idbytes[i - 2]);
|
||||||
pattern |= oddparity8(pattern);
|
pattern |= oddparity8(pattern);
|
||||||
if (i > 3) checksum ^= idbytes[i - 2];
|
if (i > 3) checksum ^= idbytes[i - 2];
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
pattern = (reflect8(checksum) & 0xFE) | oddparity8(checksum);
|
pattern = (reflect8(checksum) & 0xFE) | oddparity8(checksum);
|
||||||
pattern <<= shift;
|
pattern <<= shift;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue