new对象(short、byte数组)改为调用JCSystem.makeTransientXxxArray放到ram里面;

makeTransientXxxArray类型改为MEMORY_TYPE_TRANSIENT_RESETMEMORY_TYPE_TRANSIENT_RESET
This commit is contained in:
zcy
2025-09-09 00:08:11 +08:00
parent 8e25aab97a
commit fe4e0ff4e6

View File

@@ -1,6 +1,7 @@
package com.cscn;
import javacard.framework.Util;
import javacard.framework.JCSystem;
/**
* 辅助工具:装载/存储、位运算、线性变换、打印等。
@@ -295,7 +296,7 @@ public final class Zuc256Util {
// 处理剩余8字节
byte[] src = JCSystem.makeTransientShortArray((short)8, JCSystem.MEMORY_TYPE_TRANSIENT_RESET);
byte[] src = JCSystem.makeTransientByteArray((short)8, JCSystem.MEMORY_TYPE_TRANSIENT_RESET);
for (short i = 0; i < 8; i++) {
src[i] = (byte) (input25Byte[(short)(17 + i)] & 0x3F);
}