- PrintAndLog("\nByte Add | 0x%X", calcSumByteAdd(data, len, mask));
- PrintAndLog("Nibble Add | 0x%X", calcSumNibbleAdd(data, len, mask));
- PrintAndLog("Crumb Add | 0x%X", calcSumCrumbAdd(data, len, mask));
-
- PrintAndLog("\nByte Subtract | 0x%X", calcSumByteSub(data, len, mask));
- PrintAndLog("Nibble Subtract | 0x%X", calcSumNibbleSub(data, len, mask));
-
- PrintAndLog("\nCHECKSUM - One's complement");
- PrintAndLog("Byte Add | 0x%X", calcSumByteAddOnes(data, len, mask));
- PrintAndLog("Nibble Add | 0x%X", calcSumNibbleAddOnes(data, len, mask));
- PrintAndLog("Crumb Add | 0x%X", calcSumCrumbAddOnes(data, len, mask));
-
- PrintAndLog("Byte Subtract | 0x%X", calcSumByteSubOnes(data, len, mask));
- PrintAndLog("Nibble Subtract | 0x%X", calcSumNibbleSubOnes(data, len, mask));
-
- PrintAndLog("\nXOR");
- PrintAndLog("Byte Xor | 0x%X", calcSumByteXor(data, len, mask));
- PrintAndLog("Nibble Xor | 0x%X", calcSumNibbleXor(data, len, mask));
-
+ if (useHeader) {
+ PrintAndLog(" add | sub | add 1's compl | sub 1's compl | xor");
+ PrintAndLog("byte nibble crumb | byte nibble | byte nibble cumb | byte nibble | byte nibble cumb | BSD |");
+ PrintAndLog("------------------+-------------+------------------+-----------------+--------------------");
+ }
+ PrintAndLog("0x%X 0x%X 0x%X | 0x%X 0x%X | 0x%X 0x%X 0x%X | 0x%X 0x%X | 0x%X 0x%X 0x%X | 0x%X 0x%X |\n",
+ calcSumByteAdd(data, len, mask)
+ , calcSumNibbleAdd(data, len, mask)
+ , calcSumCrumbAdd(data, len, mask)
+ , calcSumByteSub(data, len, mask)
+ , calcSumNibbleSub(data, len, mask)
+ , calcSumByteAddOnes(data, len, mask)
+ , calcSumNibbleAddOnes(data, len, mask)
+ , calcSumCrumbAddOnes(data, len, mask)
+ , calcSumByteSubOnes(data, len, mask)
+ , calcSumNibbleSubOnes(data, len, mask)
+ , calcSumByteXor(data, len, mask)
+ , calcSumNibbleXor(data, len, mask)
+ , calcSumCrumbXor(data, len, mask)
+ , calcBSDchecksum8(data, len, mask)
+ , calcBSDchecksum4(data, len, mask)
+ );