sydapi/src/main/java/com/sunyard/inf/SydNakedSVApi.java
2022-11-04 18:27:51 +08:00

64 lines
1.7 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.sunyard.inf;
/**
* 不经过 CA 授信
* 直接使用公私钥对签名验签
*/
interface SydNakedSVApi {
/**
* 使用指定的证书 DN从加密设备获取对应的私钥证书对指定的原始数据编制裸签名(遵循 PKCS#1)
* @param orgData 待签名的原始数据
* @param sCertDN 签名者证书 DN
* @return 签名数据
*/
public byte[] SYD_NakedSign(
byte[] orgData,
String sCertDN
);
/**
* 使用指定的证书 DN从加密设备获取对应的私钥证书对指定的原始数据编制裸签名(遵循 PKCS#1)
* 人行项目增加RSA
* @param orgData 待签名的原始数据
* @param sCertDN 签名者证书 DN
* @return 签名数据
*/
public byte[] SYD_NakedSign(
int rFlag,
byte[] orgData,
String sCertDN
);
/**
* 使用指定的证书 DN对指定的原始数据编制裸验签遵循PKCS#1
* @param orgData 待签名的原始数据
* @param sign 签名数据
* @param sCertDN 签名者证书 DN
* @return 验签是否通过
*/
public boolean SYD_NakedVerify(
byte[] orgData,
byte[] sign,
String sCertDN
);
/**
* 使用指定的证书 DN对指定的原始数据编制裸验签遵循PKCS#1
* @param orgData 待签名的原始数据
* @param sign 签名数据
* @param sCertDN 签名者证书 DN
* @return 验签是否通过
*/
public boolean SYD_NakedVerify(
int rFlag,
byte[] orgData,
byte[] sign,
String sCertDN
);
}