This content has been marked as final. Show 3 replies
Transient array contents are wiped automatically when an applet deselect event OR a card tear (reset) event occurs. This is configured when creating the transient array. This is the only way of automatically clearing all transient arrays of a particular type (deselect/reset).
Programatically, the only way to clear an array is by using Util.arrayFillNonAtomic(...). You can't trigger a fake deselect/reset event from within an applet.
However, you might find want to consider using transactions... Have a look at the JCSystem package.
transactions have no meaning for transient storage, and transient storage is not affected by javacard transactions.
arrayfillnonatomic and arrayfill are equivalent for transient storage.
If you are concerned about data being cleared, you could leave it in the APDU buffer (or copy it there to work on) as this will be cleared at the end of the APDU (or before the next APDU is received).