重命名函数 hash

This commit is contained in:
cheney 2022-12-16 16:47:27 +08:00
parent 56eb803514
commit 7d0aebad53
2 changed files with 6 additions and 6 deletions

View File

@ -73,5 +73,5 @@ public interface SydHashApi {
public RetWrap countHash(int hashType, int packSn, byte[] msg, byte[] filterData);
public byte[] RSAHash(int hashType, byte[] orgData);
public byte[] hash(int hashType, byte[] orgData);
}

View File

@ -915,7 +915,7 @@ public class SydApi4j implements SydApi {
deVerify= detachedVerify(rFlag,dataType,orgData,sign);
}else {
//RetWrap hashData = countHash(0, 0, orgData, null);
byte[] hashData = RSAHash(0, orgData);
byte[] hashData = hash(0, orgData);
deVerify= this.detachedVerify(2, 0, hashData, sign);
}
return deVerify;
@ -1114,7 +1114,7 @@ public class SydApi4j implements SydApi {
sign = detachedSign(rFlag,dataType,orgData,sCertDN);
}else{
// RetWrap hashData = countHash(0, 0, orgData, null);
byte[] hash = RSAHash(0, orgData);
byte[] hash = hash(0, orgData);
sign = detachedSign(2,0, hash, sCertDN);
}
return sign;
@ -9174,7 +9174,7 @@ public class SydApi4j implements SydApi {
@param hashType HASH类型0: SHA1,1: SHA256,2: MD5
@param orgData 原始数据
*/
public byte[] RSAHash(int hashType, byte[] orgData) {
public byte[] hash(int hashType, byte[] orgData) {
byte[] hashData = new byte[0];
final int packLen = 4064;
// 如果长度小于等于 4064 发送唯一包
@ -11666,7 +11666,7 @@ public class SydApi4j implements SydApi {
verifyRSA= this.detachedVerify(rFlag, 1, orgData, sign2);
}else {
// RetWrap hashData = this.countHash(0, 0, orgData, null);
byte[] hashData = RSAHash(0, orgData);
byte[] hashData = hash(0, orgData);
verifyRSA= this.detachedVerify(2, 0, hashData, sign2);
}
return verifyRSA;
@ -11714,7 +11714,7 @@ public class SydApi4j implements SydApi {
try {
// RetWrap hashData = countHash(0, 0, orgData, null);
// byte[] hash = (byte[]) hashData.get("hash");
byte[] hash = RSAHash(0, orgData);
byte[] hash = hash(0, orgData);
String sign = this.detachedSign(2,0, hash, sCertDN);
return ASN1Util.addOriginDataToPKCS7Sign( orgData, sign );
} catch (IOException e) {