|
@ -23,6 +23,26 @@ public class ZysoftApi extends AbstractApiExecuter {
|
|
private static byte[] publicKey;
|
|
private static byte[] publicKey;
|
|
private static byte[] zkzlPublicKey;
|
|
private static byte[] zkzlPublicKey;
|
|
private static byte[] zkzlPrivateKey;
|
|
private static byte[] zkzlPrivateKey;
|
|
|
|
private static byte[] immPublicKey;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获取计免预约加密公钥
|
|
|
|
*/
|
|
|
|
private static byte[] getImmPublicKey() throws Exception {
|
|
|
|
if(immPublicKey == null)
|
|
|
|
{
|
|
|
|
immPublicKey = sehrCrypto.sehrCrypto.ReadFileBytes(ZysoftApi.class.getClassLoader().getResource(SystemConfig.getInstance().getImmPublicKey()).toURI().getPath());
|
|
|
|
}
|
|
|
|
return immPublicKey;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String getConditionRSA(String source) throws Exception
|
|
|
|
{
|
|
|
|
CryptoKey key = buildCryptoKey(getImmPublicKey());
|
|
|
|
String restult = cryptoParameter(key,source);
|
|
|
|
return restult;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@ -166,7 +186,7 @@ public class ZysoftApi extends AbstractApiExecuter {
|
|
|
|
|
|
return apiCryptoParameter;
|
|
return apiCryptoParameter;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getCryptoCredential() throws Exception
|
|
public String getCryptoCredential() throws Exception
|
|
{
|
|
{
|
|
return buildApiCryptoParameter().getTarget();
|
|
return buildApiCryptoParameter().getTarget();
|