Page 1 of 1

How to create a method to store transactions logs in java card

Posted: Mon Feb 29, 2016 2:41 am
by Ruenie
I am programming an applet in JCIDE. In fact, I want to create a method to store transactions logs in java card and call it from my outside application. The problem is I don't know how to get started with this issue. Any pointers?

Re: How to create a method to store transactions logs in java card

Posted: Wed Mar 02, 2016 8:11 am
by Erisaron
Just create a byte[] with the size that equals to the transactions size and then store data into that array by TLV and decode it using the TLV when receiving on host side.

Re: How to create a method to store transactions logs in java card

Posted: Sat Mar 05, 2016 2:52 pm
by ThePhoenyx
If you only need to keep a certain number, use a circular file. When it fills it starts overwriting the oldest. If you have to keep them all then a record based file. It also depends on if they are the same length or varying lengths.