添加大数据加密指令

This commit is contained in:
cheney 2026-05-29 16:25:04 +08:00
parent e8a62c1d4a
commit 914ba8eee5
8 changed files with 721 additions and 43 deletions

22
pom.xml
View File

@ -34,6 +34,28 @@
</dependency>
<!-- Source: https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk18on -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.65</version>
<!-- <scope>compile</scope>-->
</dependency>
<!-- Source: https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.65</version>
<!-- <scope>compile</scope>-->
</dependency>
<dependency>
<groupId>com.github.houbb</groupId>
<artifactId>junitperf</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>com.sunyard</groupId>
<artifactId>proto</artifactId>

View File

@ -0,0 +1,42 @@
package com.sunyard.entity;
import java.nio.ByteBuffer;
public class MutiReturn7 {
// 返回码
private int ret;
// 0-不是最后 1-是最后
private int isLast;
// 数据
private ByteBuffer data;
public MutiReturn7(int ret, int isLast, ByteBuffer data) {
this.ret = ret;
this.isLast = isLast;
this.data = data;
}
public int getRet() {
return ret;
}
public void setRet(int ret) {
this.ret = ret;
}
public int getIsLast() {
return isLast;
}
public void setIsLast(int isLast) {
this.isLast = isLast;
}
public ByteBuffer getData() {
return data;
}
public void setData(ByteBuffer data) {
this.data = data;
}
}

View File

@ -0,0 +1,44 @@
package com.sunyard.util;
import java.nio.ByteBuffer;
public class ByteBufferUtil {
public static ByteBuffer sliceRange(ByteBuffer source, int start, int length) {
// 保存原 buffer position limit
int oldPos = source.position();
int oldLimit = source.limit();
// 设置新的 position limit 为目标区间
source.position(start);
source.limit(start + length);
// 创建共享视图零拷贝
ByteBuffer slice = source.slice();
// 恢复原 buffer position limit
source.position(oldPos);
source.limit(oldLimit);
return slice;
}
public static ByteBuffer sliceAndConsume(ByteBuffer source, int length) {
// 保存原 buffer position limit
int oldPos = source.position();
int oldLimit = source.limit();
// 设置新的 position limit 为目标区间
int start = oldPos;
source.position(start);
source.limit(start + length);
// 创建共享视图零拷贝
ByteBuffer slice = source.slice();
// 恢复原 buffer position limit
source.position(oldPos + length);
source.limit(oldLimit);
return slice;
}
}

View File

@ -0,0 +1,367 @@
package com.sunyard.util;
import java.util.Collection;
import java.util.Map;
/**
* 参数检查工具类提供常见的参数校验方法
* <p>
* 所有方法在校验失败时均抛出 {@link IllegalArgumentException} 异常
* 并附带包含参数名的明确错误信息成功时返回被校验的值便于链式调用
* </p>
*
* <p>使用示例
* <pre>{@code
* public void setAge(int age) {
* ParamChecker.checkInRange(age, "age", 0, 150);
* }
*
* public void setName(String name) {
* ParamChecker.checkNotBlank(name, "name");
* }
*
* public void setStatus(int status) {
* ParamChecker.checkInValues(status, "status", 1, 2, 3);
* }
* }</pre>
* </p>
*
* @author Cheney
*/
public final class ParamChecker {
private ParamChecker() {
// 私有构造器防止实例化
}
/**
* 检查表达式是否为真若为假则抛出异常
*
* @param expression 待检查的布尔表达式
* @param message 异常信息
* @throws IllegalArgumentException 如果 expression false
*/
public static void checkArgument(boolean expression, String message) {
if (!expression) {
throw new IllegalArgumentException(message);
}
}
// ==================== 对象非空检查 ====================
/**
* 检查对象不为 null
*
* @param obj 待检查的对象
* @param paramName 参数名称用于异常信息
* @param <T> 对象类型
* @return 传入的对象便于链式调用
* @throws IllegalArgumentException 如果 obj null
*/
public static <T> T checkNotNull(T obj, String paramName) {
if (obj == null) {
throw new IllegalArgumentException("参数 '" + paramName + "' 不能为 null");
}
return obj;
}
// ==================== 字符串检查 ====================
/**
* 检查字符串不为 null 且长度大于 0不忽略空白字符
*
* @param str 待检查的字符串
* @param paramName 参数名称
* @return 传入的字符串
* @throws IllegalArgumentException 如果 str null 或空字符串
*/
public static String checkNotEmpty(String str, String paramName) {
if (str == null || str.isEmpty()) {
throw new IllegalArgumentException("参数 '" + paramName + "' 不能为 null 或空字符串");
}
return str;
}
/**
* 检查字符串不为 null 且去除首尾空白后长度大于 0
*
* @param str 待检查的字符串
* @param paramName 参数名称
* @return 传入的字符串原值 trim 后结果
* @throws IllegalArgumentException 如果 str null 或仅包含空白字符
*/
public static String checkNotBlank(String str, String paramName) {
if (str == null || str.isBlank()) {
throw new IllegalArgumentException("参数 '" + paramName + "' 不能为 null、空字符串或仅包含空白字符");
}
return str;
}
/**
* 检查字符串长度在指定范围内包含边界
*
* @param str 待检查的字符串
* @param paramName 参数名称
* @param min 最小长度包含
* @param max 最大长度包含
* @return 传入的字符串
* @throws IllegalArgumentException 如果 str null或长度不在 [min, max] 范围内
*/
public static String checkLengthBetween(String str, String paramName, int min, int max) {
checkNotNull(str, paramName);
if (min > max) {
throw new IllegalArgumentException("内部错误:长度检查的最小值 " + min + " 不能大于最大值 " + max);
}
int len = str.length();
if (len < min || len > max) {
throw new IllegalArgumentException(
String.format("参数 '%s' 的长度 %d 不在允许范围 [%d, %d] 内", paramName, len, min, max));
}
return str;
}
// ==================== 整数int检查 ====================
/**
* 检查 int 值大于 0
*
* @param value 待检查的值
* @param paramName 参数名称
* @return 传入的值
* @throws IllegalArgumentException 如果 value <= 0
*/
public static int checkPositive(int value, String paramName) {
if (value <= 0) {
throw new IllegalArgumentException("参数 '" + paramName + "' 必须为正数,当前值: " + value);
}
return value;
}
/**
* 检查 int >= 0
*
* @param value 待检查的值
* @param paramName 参数名称
* @return 传入的值
* @throws IllegalArgumentException 如果 value < 0
*/
public static int checkNonNegative(int value, String paramName) {
if (value < 0) {
throw new IllegalArgumentException("参数 '" + paramName + "' 不能为负数,当前值: " + value);
}
return value;
}
/**
* 检查 int 值在指定范围内包含边界
*
* @param value 待检查的值
* @param paramName 参数名称
* @param min 最小值包含
* @param max 最大值包含
* @return 传入的值
* @throws IllegalArgumentException 如果 value 不在 [min, max] 范围内 min > max
*/
public static int checkInRange(int value, String paramName, int min, int max) {
if (min > max) {
throw new IllegalArgumentException("内部错误:范围检查的最小值 " + min + " 不能大于最大值 " + max);
}
if (value < min || value > max) {
throw new IllegalArgumentException(
String.format("参数 '%s' 的值 %d 不在允许范围 [%d, %d] 内", paramName, value, min, max));
}
return value;
}
/**
* 检查 int 值是否等于给定集合中的任意一个值
*
* @param value 待检查的值
* @param paramName 参数名称
* @param validValues 允许的值列表
* @return 传入的值
* @throws IllegalArgumentException 如果 value 不在 validValues validValues 为空
*/
public static int checkInValues(int value, String paramName, int... validValues) {
if (validValues == null || validValues.length == 0) {
throw new IllegalArgumentException("内部错误:允许的值集合不能为空");
}
for (int v : validValues) {
if (value == v) {
return value;
}
}
// 构建允许值字符串用于提示
StringBuilder allowed = new StringBuilder();
for (int i = 0; i < validValues.length; i++) {
if (i > 0) allowed.append(", ");
allowed.append(validValues[i]);
}
throw new IllegalArgumentException(
String.format("参数 '%s' 的值 %d 不在允许值集合 [%s] 中", paramName, value, allowed));
}
// ==================== 长整型long检查 ====================
/**
* 检查 long 值大于 0
*
* @param value 待检查的值
* @param paramName 参数名称
* @return 传入的值
* @throws IllegalArgumentException 如果 value <= 0
*/
public static long checkPositive(long value, String paramName) {
if (value <= 0) {
throw new IllegalArgumentException("参数 '" + paramName + "' 必须为正数,当前值: " + value);
}
return value;
}
/**
* 检查 long >= 0
*
* @param value 待检查的值
* @param paramName 参数名称
* @return 传入的值
* @throws IllegalArgumentException 如果 value < 0
*/
public static long checkNonNegative(long value, String paramName) {
if (value < 0) {
throw new IllegalArgumentException("参数 '" + paramName + "' 不能为负数,当前值: " + value);
}
return value;
}
/**
* 检查 long 值在指定范围内包含边界
*
* @param value 待检查的值
* @param paramName 参数名称
* @param min 最小值包含
* @param max 最大值包含
* @return 传入的值
* @throws IllegalArgumentException 如果 value 不在 [min, max] 范围内 min > max
*/
public static long checkInRange(long value, String paramName, long min, long max) {
if (min > max) {
throw new IllegalArgumentException("内部错误:范围检查的最小值 " + min + " 不能大于最大值 " + max);
}
if (value < min || value > max) {
throw new IllegalArgumentException(
String.format("参数 '%s' 的值 %d 不在允许范围 [%d, %d] 内", paramName, value, min, max));
}
return value;
}
// ==================== 浮点数double简单检查 ====================
/**
* 检查 double 值大于 0考虑极小正数不做精度处理
*
* @param value 待检查的值
* @param paramName 参数名称
* @return 传入的值
* @throws IllegalArgumentException 如果 value <= 0 或为 NaN
*/
public static double checkPositive(double value, String paramName) {
if (value <= 0 || Double.isNaN(value)) {
throw new IllegalArgumentException("参数 '" + paramName + "' 必须为正数,当前值: " + value);
}
return value;
}
/**
* 检查 double >= 0
*
* @param value 待检查的值
* @param paramName 参数名称
* @return 传入的值
* @throws IllegalArgumentException 如果 value < 0 或为 NaN
*/
public static double checkNonNegative(double value, String paramName) {
if (value < 0 || Double.isNaN(value)) {
throw new IllegalArgumentException("参数 '" + paramName + "' 不能为负数或 NaN当前值: " + value);
}
return value;
}
// ==================== 集合与数组非空检查 ====================
/**
* 检查集合不为 null 且非空
*
* @param coll 待检查的集合
* @param paramName 参数名称
* @param <T> 集合元素类型
* @return 传入的集合
* @throws IllegalArgumentException 如果 coll null 或空集合
*/
public static <T> Collection<T> checkNotEmpty(Collection<T> coll, String paramName) {
if (coll == null || coll.isEmpty()) {
throw new IllegalArgumentException("参数 '" + paramName + "' 不能为 null 或空集合");
}
return coll;
}
/**
* 检查 Map 不为 null 且非空
*
* @param map 待检查的 Map
* @param paramName 参数名称
* @param <K> 键类型
* @param <V> 值类型
* @return 传入的 Map
* @throws IllegalArgumentException 如果 map null 或空 Map
*/
public static <K, V> Map<K, V> checkNotEmpty(Map<K, V> map, String paramName) {
if (map == null || map.isEmpty()) {
throw new IllegalArgumentException("参数 '" + paramName + "' 不能为 null 或空 Map");
}
return map;
}
/**
* 检查数组不为 null 且长度大于 0
*
* @param array 待检查的数组
* @param paramName 参数名称
* @param <T> 数组元素类型
* @return 传入的数组
* @throws IllegalArgumentException 如果 array null 或长度为 0
*/
public static <T> T[] checkNotEmpty(T[] array, String paramName) {
if (array == null || array.length == 0) {
throw new IllegalArgumentException("参数 '" + paramName + "' 不能为 null 或空数组");
}
return array;
}
// ==================== 布尔条件检查 ====================
/**
* 检查布尔条件为 true
*
* @param condition 待检查的条件
* @param paramName 参数名称描述条件含义
* @throws IllegalArgumentException 如果 condition false
*/
public static void checkTrue(boolean condition, String paramName) {
if (!condition) {
throw new IllegalArgumentException("参数条件 '" + paramName + "' 必须为 true");
}
}
/**
* 检查布尔条件为 false
*
* @param condition 待检查的条件
* @param paramName 参数名称描述条件含义
* @throws IllegalArgumentException 如果 condition true
*/
public static void checkFalse(boolean condition, String paramName) {
if (condition) {
throw new IllegalArgumentException("参数条件 '" + paramName + "' 必须为 false");
}
}
}

View File

@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.StopWatch;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ByteUtil;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.sunyard.RetWrap;
@ -13,6 +14,7 @@ import com.sunyard.SydApiException;
import com.sunyard.cert.X509;
import com.sunyard.constant.CertUsage;
import com.sunyard.entity.ImportResult;
import com.sunyard.entity.MutiReturn7;
import com.sunyard.entity.Struct;
import com.sunyard.log.ILogFactory;
import com.sunyard.log.ILogger;
@ -6825,6 +6827,134 @@ public class SydApi4j implements SydApi {
return SYMUtil.derEnData2Base64EnC1C2C3(((PacketSection) ret.get("cipherData")).getBytes());
}
public byte[] SYD_SM2Encrypt(byte[] publicKey, byte[] pOrgData){
ParamChecker.checkNotNull(publicKey, "publicKey");
ParamChecker.checkNotNull(pOrgData, "pOrgData");
final int CHUNK_SIZE = 63 * 1024; // 64 KB
int dataLen = pOrgData.length;
int offset = 0;
while (offset < dataLen) {
int len = Math.min(CHUNK_SIZE, dataLen - offset);
// 调用底层支持偏移量的加密方法
SYD_SM2Encrypt(1, publicKey, ByteBuffer.wrap(pOrgData, offset, len), offset);
offset += len;
}
// 计算
SYD_SM2Encrypt(2, publicKey, null, 0);
// 取回
int idx = 0;
List<ByteBuffer> chunks = new ArrayList<>();
int totalLen = 0;
int isLast = 0;
while (isLast != 1) {
MutiReturn7 ret = SYD_SM2Encrypt(3, null, null, idx);
ByteBuffer bb = ret.getData();
isLast = ret.getIsLast();
if (bb != null && bb.remaining() > 0) {
int remaining = bb.remaining();
chunks.add(bb); // 直接存储不需要 duplicate
totalLen += remaining;
idx += remaining;
} else if (isLast != 1) {
// 没有数据但还不是最后一块异常
throw new RuntimeException("Empty chunk with isLast=0");
}
}
byte[] result = new byte[totalLen];
int offset2 = 0;
for (ByteBuffer chunk : chunks) {
int len = chunk.remaining();
chunk.get(result, offset2, len);
offset2 += len;
}
return result;
}
// @Override
// 支持大包加解密
private MutiReturn7 SYD_SM2Encrypt(int dataType, byte[] publicKey, ByteBuffer pOrgData, int idx) {
// 参数检查
ParamChecker.checkInRange(dataType, "dataType", 1, 3);
// 最大缓存 64K
// 根据输入数据快速估算缓存大小
int buffLen = 4096;
if( 1 == dataType ) {
buffLen = pOrgData.limit() > 4096 ? 64*1024 : 5*1024;
}
ByteBuffer bb = ByteBuffer.allocate(buffLen );
PacketSN sn = PacketSN.gen();
bb.put(new byte[2]);
bb.put(sn.getSn().array());
bb.put("7F".getBytes());
bb.put((byte) dataType); // 数据包标志
if ( 2 == dataType ) { // 公钥
bb.put(ByteUtil.shortToBytes((short) publicKey.length));
bb.put(publicKey);
}
if ( 1 == dataType ) { // 数据
bb.put(ByteUtil.shortToBytes((short) pOrgData.limit()));
bb.put(pOrgData);
bb.put(ByteUtil.shortToBytes((short)idx));
}
if ( 3 == dataType) { // 仅数据长度
bb.put( ByteUtil.shortToBytes((short) (63*1024)) );
bb.put( ByteUtil.shortToBytes((short)idx));
}
// 重新计算长度
int len = bb.position();
len -= 2;
byte[] lenArray = new byte[2];
lenArray[0] = (byte) ((len >> 8) & 0xFF);
lenArray[1] = (byte) (len & 0xFF);
bb.put(lenArray);
// 通信
synchronized (this) {
// 响应解析
bb = syncRead(syncSend(bb));
}
bb.flip();
bb.position(12);
byte[] code = new byte[2];
bb.get(code);
int retCode = Integer.valueOf(new String(code));
if (0 != retCode) {
throw new SydApiException(retCode);
}
// 只有类型是 3 时有数据结果
if ( 3 == dataType ){
int isLast = bb.get();
byte[] dataLenArr = new byte[2];
bb.get(dataLenArr);
int dataLen = ByteUtil.bytesToInt(dataLenArr);
// byte[] data = new byte[dataLen];
// bb.get(data);
ByteBuffer slice = ByteBufferUtil.sliceAndConsume(bb, dataLen);
return new MutiReturn7(retCode, isLast, slice);
} else {
return new MutiReturn7(retCode, 0, null);
}
}
@Override
public String SM2Encrypt(byte[] publicKey, byte[] pOrgData) {
Proto77 proto = new Proto77();

View File

@ -0,0 +1,72 @@
package cmbpoc;
import com.sunyard.proto.Util;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import racal.sunyard.main.SydApi4j;
public class FunctionTest {
private SydApi4j api;
private String keypairIndex;
private byte[] privateKey;
private byte[] publicKey;
private byte[] orgData;
private String sign;
@Before
public void start(){
// 调试模式
System.setProperty("com.sunyard.sydapi4j.debug", "true");
// 建立链接单台
this.api = (SydApi4j) new SydApi4j().connect("192.168.0.100", 8889, null, 1000);
}
@After
public void stop(){
if ( null != api ) {
this.api.disconnect();
this.api = null;
}
}
@Test
public void getPrivateKeyAndPublickKey(){
this.publicKey = Util.hexString2Bytes(
this.api.SM2GetPublicKeyC(keypairIndex)
);
this.privateKey = Util.hexString2Bytes(
this.api.SM2GetPrivateKeyC(keypairIndex)
);
}
@Test
public void SYD_SM2_Sign(){
this.api.SYD_SM2_Sign_HA(1, privateKey, publicKey, orgData);
}
@Test
public void SYD_SM2_Verify(){
this.api.SYD_SM2_Verify_HA(1, publicKey, orgData, sign);
}
@Test
public void SYD_SM2_Encrypt(){
this.api.SM2Decrypt();
}
}

View File

@ -22,7 +22,7 @@ public class CertTest {
public static void main(String[] args) {
//System.setProperty("com.sunyard.sydapi4j.debug", "true");
SydApi4j api = (SydApi4j) new SydApi4j().connect("172.16.18.5", 8889, null, 1000);
SydApi4j api = (SydApi4j) new SydApi4j().connect("192.168.1.129", 8889, null, 1000);
try{
List<String>dns = api.getAllCert();
System.out.println(Arrays.toString( dns.toArray() ) );

View File

@ -8,54 +8,55 @@ import racal.sunyard.main.SydApiBuilder;
public class TestShangqingXingye {
private static final byte[] orgDataBig = new byte[ 5 * 1024];
private static final byte[] orgData2k = new byte[ 2 * 1024];
private static final String pcDnEN = "C=CN,O=CFCA OCA1,OU=YCCA,OU=Individual-2,CN=YCCA@黄金交易所@Zhuangj@1";
private static final String pcDnEN = "C=CN,O=CFCA TEST SM2 OCA31,OU=SGE,OU=Organizational-2,CN=SGE051@7028-702821-b70280002@Z000000001@1";
private static final String pcDnEN2 = "C=CN,O=OCA31SM2,OU=Local RA OCA31,OU=Organizational-2,CN=CFCA@sunyard@N91330108762038374D@52";
public static void main(String[] args) {
//System.setProperty("com.sunyard.sydapi4j.debug", "true");
long startTime = System.currentTimeMillis(); //获取开始时间
SydApiBuilder builder = new SydApiBuilder().setIp("192.168.0.100");
SydApiBuilder builder = new SydApiBuilder().setIp("172.1.41.214");
SydApi4j api = (SydApi4j) builder.build();
try {
/**
* 产生对称密钥通过公钥加密生成数字信封
* @param pcDnEN: 清算所的公钥证书
* @param pcData: 明文数据
* @return RetWrap: 数字信封
*/
RetWrap signData = api.generateDEByDn(pcDnEN, orgDataBig);
byte[] cpkey2 = (byte[]) signData.get("CipherKey");
System.out.println("加密信封:" + new String(cpkey2));
/**
* 接收用私钥解密数字信封还原原文
* @param pcDnEN: 清算所的公钥证书
* @param cpkey: 数字信封
* @return preData: 原数据
*/
RetWrap oDataWrap = api.decryptDEByDN(pcDnEN, cpkey2);
byte[] preData = (byte[]) oDataWrap.get("oData");
System.out.println("解密信封:" + Util.bytes2HexString(preData));
/**
* 通过指定的私钥对指定的原始数据编制带公钥证书的数字签名遵循PKCS#7
* @param orgData: 待签名的原始数据
* @param pcDnEN: 签名者证书 DN
* @return signsData: 签名数据
*/
String signsData = api.SYD_SM2_DetachedSign_HA(orgData2k, pcDnEN);
System.out.println("签名数据:" + signsData);
/**
* 利用清算所的公钥证书对签名数据进行验签
* @param dataType: 数据模式, 0:输入的数据为 HASH 后的数据, 1:输入的数据为原始数据库(本次传入1)
* @param orgData: 待签名的原始数据
* @param sign: 签名数据
*/
boolean result = api.detachedVerify(1, orgData2k, signsData);
System.out.println("验签结果:" + result);
// /**
// * 产生对称密钥通过公钥加密生成数字信封
// * @param pcDnEN: 清算所的公钥证书
// * @param pcData: 明文数据
// * @return RetWrap: 数字信封
// */
// RetWrap signData = api.generateDEByDn(pcDnEN, orgDataBig);
// byte[] cpkey2 = (byte[]) signData.get("CipherKey");
// System.out.println("加密信封:" + new String(cpkey2));
//
// /**
// * 接收用私钥解密数字信封还原原文
// * @param pcDnEN: 清算所的公钥证书
// * @param cpkey: 数字信封
// * @return preData: 原数据
// */
// RetWrap oDataWrap = api.decryptDEByDN(pcDnEN, cpkey2);
// byte[] preData = (byte[]) oDataWrap.get("oData");
// System.out.println("解密信封:" + Util.bytes2HexString(preData));
//
//
// /**
// * 通过指定的私钥对指定的原始数据编制带公钥证书的数字签名遵循PKCS#7
// * @param orgData: 待签名的原始数据
// * @param pcDnEN: 签名者证书 DN
// * @return signsData: 签名数据
// */
// String signsData = api.SYD_SM2_DetachedSign_HA(orgData2k, pcDnEN);
// System.out.println("签名数据:" + signsData);
//
// /**
// * 利用清算所的公钥证书对签名数据进行验签
// * @param dataType: 数据模式, 0:输入的数据为 HASH 后的数据, 1:输入的数据为原始数据库(本次传入1)
// * @param orgData: 待签名的原始数据
// * @param sign: 签名数据
// */
// boolean result = api.detachedVerify(1, orgData2k, signsData);
// System.out.println("验签结果:" + result);
/**
@ -67,7 +68,7 @@ public class TestShangqingXingye {
* @param pcData: 明文数据
* @return pcSignData: 签名数字信封
*/
String pcSignData = api.SYD_SignDigitalEnvelope(pcDnEN, pcDnEN, orgData2k);
String pcSignData = api.SYD_SignDigitalEnvelope(pcDnEN2, pcDnEN2, orgData2k);
System.out.println("签名数字信封:" + pcSignData);
/**
@ -79,7 +80,7 @@ public class TestShangqingXingye {
* @return pcData原数据
*/
byte[] oData = api.SYD_VerifyDigitalEnveloe(pcDnEN, pcDnEN, pcSignData);
byte[] oData = api.SYD_VerifyDigitalEnveloe(pcDnEN2, pcDnEN2, pcSignData);
System.out.println("原数据:" + Util.bytes2HexString(oData));