How to understand java card atomic?
Posted: Thu Feb 07, 2019 11:12 am
How to understand java card atomic?Could anybody give a detail instance to explain?
JavaCardOS - JavaCardForum
http://www.javacardos.com/javacardforum/
http://www.javacardos.com/javacardforum/viewtopic.php?f=15&t=1985
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);