Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

How to put a string to my card

JavaCard Applet Development Related Questions and Answers.
poinonche
Posts: 13
Joined: Wed May 10, 2017 11:10 pm
Points :170
Contact:

How to put a string to my card

Post by poinonche » Wed May 10, 2017 11:26 pm

Hi all experts here,

I am new to java card programme.

I want to know if there is any way to put a string to my card and store them.

Code: Select all

byte helloword[];
byte[] buffer = apdu.getBuffer();
apdu.setIncomingAndReceive();
short length = (short)buffer[ISO7816.OFFSET_LC];
Util.arrayCopyNonAtomic(buffer, (short)0, helloword, (short)0, (short) length);



Thanks in advance.

Poin

tay00000
Posts: 161
Joined: Tue Sep 27, 2016 10:58 am
Points :2324
Contact:

Re: How to put a string to my card

Post by tay00000 » Thu May 11, 2017 7:00 am

JavaCard datatypes are byte, byte[], short, boolean, some sort of Key related objects and sometimes certain cards come with int type. There is no such thing as String type. You have to convert String to byte[] before transmitting to card.

Also, since you are new to JavaCard and probably smart card development, please read up on the ISO-7816 standards and JavaCard and GlobalPlatform standards for starters before developing any card applet. You need to have a basic understanding on how a smart card works and how JavaCard, ISO-7816 and GlobalPlatform standards affect how smart cards operate.

If you intend to continue card development without having the required knowledge, you might create card applets that do not fully utilize the security benefits of a smart card and probably introduce a lot of bugs as well.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 48 guests

JavaCard OS : Disclaimer