小程序是否可以安装另一个小程序或发送 APDU?

Is that possible for an applet to install another applet or to send APDUs?

javacard 小程序是否可以下载并安装另一个小程序?

小程序是否可以向另一个小程序发送 APDU(信息)?

如果是这样,谁能引导我找到正确的文档以开始?

Is that possible for a javacard applet to download and install another applet?

不,那不可能,根本没有 API。在来自 Global Platform 的所有示例中——这可能比 Java 卡规范更相关——小程序数据是通过 APDU 命令加载的。 Java Card API 当然有一个 Applet.install 方法,但是它被系统 调用 并且不能从另一个小程序使用 -据我所知,甚至不是安全域。

Is that possible for an applet to send APDUs (information) to another applet?

是的,您可以让一个 class 实现 Shareable 接口并通过 getShareableInterfaceObject 方法共享它。所有 Java 卡片教程都将包含此内容。

APDU 缓冲区不能共享,但不需要共享,您可以简单地通过APDU 方法访问它。来自 API:

The Java Card runtime environment designates the APDU object as a temporary Java Card runtime environment Entry Point Object (See Runtime Environment Specification, Java Card Platform, Classic Edition, section 6.2.1 for details). A temporary Java Card runtime environment Entry Point Object can be accessed from any applet context. References to these temporary objects cannot be stored in class variables or instance variables or array components.

请阅读教程或购买旧的但仍然有效的 Java Card technology for Smart Cards。它很旧,但核心原理仍然完全有效,大多数其他基本的东西可以通过研究 API.

来学习