JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html

How to understand java card atomic?

JavaCard Applet Development Related Questions and Answers.
sandbox
Posts: 2
Joined: Tue Feb 05, 2019 3:13 am
Points :22
Contact:

How to understand java card atomic?

Post by sandbox » Thu Feb 07, 2019 11:12 am

How to understand java card atomic?Could anybody give a detail instance to explain?

kuafu
Posts: 317
Joined: Thu Jun 25, 2015 2:09 am
Points :4563
Contact:

Re: How to understand java card atomic?

Post by kuafu » Fri Feb 15, 2019 7:48 pm

https://www.javacardos.com/wiki/javacar ... es/storage

Code: Select all

JCSystem.beginTransaction();
            //Copies an array from the 'buf' source array, beginning at the ISO7816.OFFSET_CDATA position(non-atomically).
            Util.arrayCopyNonAtomic(buf, ISO7816.OFFSET_CDATA, tmpMemory, (short)0, lc);
            //Copies an array from the 'tmpMemory' source array, beginning at the 0 position
            Util.arrayCopy(tmpMemory, (short)0, buf, (short)0, lc);
            //Commits an atomic transaction. The contents of commit buffer is atomically committed. 
            JCSystem.commitTransaction();
            apdu.setOutgoingAndSend((short)0, (short)lc);
try this sample
well

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: Bing [Bot] and 63 guests

JavaCard OS : Disclaimer