整合其他分支的接口,并给没有注释的接口添加注释
This commit is contained in:
@@ -211,7 +211,7 @@ interface SydDetachedSVApi {
|
||||
* 通过指定的私钥对指定的原始数据编制带公钥证书的数字签名(遵循PKCS#7)
|
||||
* 数据模式可选 DATA_HASH 或 DATA_ORIGIN
|
||||
*
|
||||
* @param dataType 输入的数据为 HASH 后的数据 DATA_HASH = 0 ,输入的数据为原始数据库 DATA_ORIGIN = 1
|
||||
* @param dataType 数据模式,输入的数据为 HASH 后的数据 DATA_HASH = 0 ,输入的数据为原始数据库 DATA_ORIGIN = 1
|
||||
* @param orgData 输入的数据
|
||||
* @param sCertDN 签名者证书 DN
|
||||
* @return 签名数据
|
||||
@@ -221,13 +221,27 @@ interface SydDetachedSVApi {
|
||||
byte[] orgData,
|
||||
String sCertDN
|
||||
);
|
||||
//8024
|
||||
|
||||
/**
|
||||
* 带公钥证书与签名属性的数字签名(遵循 PKCS#7)
|
||||
* @param dataType 数据类型:0,hash 模式,1为非hash模式
|
||||
* @param orgData 当为hash模式时,值为hash值,当为非hash模式时,值为数据
|
||||
* @param keyTag 密钥对应的索引号
|
||||
* @return 签名的 DER 编码
|
||||
*/
|
||||
public byte[] detachedSign(
|
||||
int dataType,
|
||||
byte[] orgData,
|
||||
int sCertDN
|
||||
int keyTag
|
||||
);
|
||||
|
||||
/**
|
||||
* 带公钥证书的PKCS#7数字签名(序列号)
|
||||
* @param dataType 数据类型:0,hash 模式,1为非hash模式
|
||||
* @param orgData 当为hash模式时,值为hash值,当为非hash模式时,值为要签名的信息
|
||||
* @param certificateNo X509证书序号
|
||||
* @return 符合PKCS7标准的签名结果
|
||||
*/
|
||||
public String detachedSignbysn(
|
||||
int dataType,
|
||||
byte[] orgData,
|
||||
@@ -247,12 +261,30 @@ interface SydDetachedSVApi {
|
||||
int dataType,
|
||||
byte[] orgData,
|
||||
String sign);
|
||||
//8025
|
||||
|
||||
/**
|
||||
* 带公钥证书与签名属性的数字签名验签(遵循 PKCS#7)
|
||||
* @param dataType 数据类型:0,hash 模式,1为非hash模式
|
||||
* @param orgData 当为hash模式时,值为hash值,当为非hash模式时,值为数据
|
||||
* @param sign 已签名数据
|
||||
* @return 是否正确
|
||||
*/
|
||||
boolean detachedVerify(
|
||||
int dataType,
|
||||
byte[] orgData,
|
||||
byte[] sign);
|
||||
|
||||
/**
|
||||
* 计算SM3散列值
|
||||
* @param packSn 消息块号,0=仅一块,1=第一块,2=中间块,3=最后块
|
||||
* @param userId 用户 ID,只对“消息块号”为 0、1 时有效
|
||||
* @param publicKey 公钥的 DER 编码
|
||||
* @param msg 二进制的消息块
|
||||
* @param filterData 过渡消息数据,只对“消息块号”为 2、3 时有效
|
||||
* @return
|
||||
* filterData: 过渡消息数据,只对“消息块号”为 2、1 时有效
|
||||
* hash: hash
|
||||
*/
|
||||
RetWrap SM3Hash(int packSn, String userId, byte[] publicKey, byte[] msg, byte[] filterData);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user