Page 1 of 1

Store a String data in JavaCard

Posted: Thu Jun 11, 2015 3:26 am
by Marshaldll
As we all know, JavaCard doesn't support String type. But now i need to store String data in JavaCard.What can i do ? any help is appreciated!

Re: Store a String data in JavaCard

Posted: Thu Jun 11, 2015 4:14 am
by horse dream
String data can be represented as byte array. Creat byte array first, and then initialize array.
e.g.

Code: Select all

byte string[];
string = {'h', 'e', 'l', 'l', 'o'};


PS: The above code only works fine within the ASCII range of characters.