0

I can't decode the DUKPT swipe Data, I'm trying using differers examples but the credit card information is encoded yet.

pnuts
  • 58,317
  • 11
  • 87
  • 139
  • I'm not sure what you're asking here. Maybe you should post some code? What have you tried so far? – user4235730 Sep 12 '15 at 07:03
  • Please provide some code samples - without them people will not be able to give you the answer you are looking for. I also suggest that you read the [How To Ask](http://stackoverflow.com/help/how-to-ask) guide. BTW, welcome! – plamut Sep 22 '15 at 03:11

1 Answers1

1

I had a headache trying of decoding the swipe information:

This example can help you to do it:

To Download the Java Example here: https://github.com/ricardojava/mobile/tree/master/TEST_GATE2all/src/com/bbpos To Modify the file: https://github.com/ricardojava/mobile/blob/master/TEST_GATE2all/src/com/bbpos/SimpleMain.java

String bdk = "0123456789ABCDEFFEDCBA9876543210"; String ksn = "00000232100117e00027"; String tk1 = "de8bfe769dca885cf3cc312135fe2cccfacf176235f4bdee773d1865334315ed2aefcab613f1884b5d63051703d5a0e2bd5d1988eeabe641bd5d1988eeabe641";

   String key = DUKPTServer.GetDataKey(ksn, bdk);

String decryptedTLV = TripleDES.decrypt_CBC(tk1, key);

byte[] s = DatatypeConverter.parseHexBinary(decryptedTLV);

    System.out.println(new String(s));

} I hope it can help you!........