Merge branch 'dev-icbc' into dev-shangqing

# Conflicts:
#	.gitignore
#	doc/java接口说明文档.docx
#	src/main/java/racal/sunyard/main/SydApi4j.java
#	src/test/java/com/sunyard/sydapi/test/TestAllMethods.java
#	src/test/java/com/sunyard/sydapi/test/TestSV.java
This commit is contained in:
cheney
2022-08-18 14:58:18 +08:00
17 changed files with 646 additions and 674 deletions
@@ -3,6 +3,7 @@ package com.sunyard.inf;
import com.sunyard.RetWrap;
import java.io.UnsupportedEncodingException;
import java.util.List;
/**
* 对称加解密相关接口
@@ -273,6 +274,9 @@ interface SydSYMApi {
*/
byte[] SYMEncryptData(int nAlg, String seesionKey, int fullmode, byte[] pINdata);
List<byte[]> SYMEncryptDecryptBatchData(int nAlg, String[] seesionKey, int fullmode, List<byte[]> pINdata);
/**
* 用输入的会话密钥,对指定报文数据进行加密处理。
*
+3 -3
View File
@@ -60,8 +60,8 @@ interface SydAttachedSVApi {
* @param orgData 要签名的信息
* @return 签名结果
*/
String SM2SignC(int flag, String privateKey, byte[] publicKey, byte[] orgData);
String SM2SignC(int flag, String pUserID, String privateKey, byte[] publicKey, byte[] orgData);
byte[] SM2SignC(int flag, String privateKey, byte[] publicKey, byte[] orgData);
byte[] SM2SignC(int flag, String pUserID, String privateKey, byte[] publicKey, byte[] orgData);
/**
* SM2 私钥签名
* @param pUserID 使用者的 ID,最大长度为 16 位数字,右对齐。
@@ -142,7 +142,7 @@ interface SydAttachedSVApi {
int nOrgDataType,
byte[] publicKey,
byte[] orgData,
String sign
byte[] sign
);
@@ -117,13 +117,13 @@ public interface SydHAApi {
* @param nOrgDataType 签名数据类型,SydApi.DATA_ORIGIN(1) 原始数据 SydApi.DATA_HASH(0) : hash 后的类型
* @param publicKey 公钥串,DER编码,HEX格式
* @param orgData 待签名的原始数据,“签名数据类型”为 0 时:HASH 值。“签名数据类型”为 1 时:要签名的信息
* @param base64Sign 签名数据 (DER 编码 + Base64 编码)
* @param sign S+R
* @return 验签是否通过
*/
public boolean SM2Verify(
int nOrgDataType,
byte[] publicKey,
byte[] orgData,
String base64Sign
byte[] sign
);
}