Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 javaCard 2.2.1 并尝试编写一些代码来在我的实现中实现全局平台的一部分我需要发送一个 apdu 及其数据和 SW 设置为空间值如何在不使用的情况下设置 SWIsoException.throwIt()
IsoException.throwIt()
大多数人使用以下方式,
apdu.setOutgoingAndSend(ISO7816.OFFSET_CDATA, length); ISOException.throwIt(ISO7816.XXX...);
请注意,在代码的第二条语句中,某些 JCVM/JCRE 不允许抛出 SW1SW2 的任意值。它们允许标准 SW1,如6Fxx, 90xx. 您可以将 SW2 编码为保持 SW1 标准的任何值。
6Fxx
90xx