+ // see if user area is xored or just zeros.
+ int numOfZeros = 0;
+ for (int index=22; index < 256; ++index){
+ if ( data_buf[index] == 0x00 )
+ ++numOfZeros;
+ }
+ // if possible zeros is less then 60%, lets assume data is xored
+ // 256 - 22 (header) = 234
+ // 1024 - 22 (header) = 1002
+ int isXored = (numOfZeros*100/stamp_len) < 50;
+ PrintAndLog("is data xored? %d ( %d %)", isXored, (numOfZeros*100/stamp_len));
+
+ print_hex_break( data_buf, 33, 16);
+