- if ( wrc>0 ) {
- PrintAndLog("WRC protected area:");
-
- for ( k=i; k < wrc; k++)
- data_buf[k] ^= crc;
-
- for ( k=i; k < wrc; k += 8)
- PrintAndLog("%s", sprint_hex( data_buf+k, 8) );
+ if ( hasWRC ) {
+ PrintAndLog("WRC protected area: (I %d | K %d| WRC %d)", i, k, wrc);
+
+ // de-xor? if not zero, assume it needs xoring.
+ if ( data_buf[i] > 0) {
+ for ( k=i; k < wrc; ++k)
+ data_buf[k] ^= crc;
+ }
+ print_hex_break( data_buf+i, wrc, 16);