java如何在libjmrd0.6.0中使用doPACE?
如何在JMRTD 0.6.0中获取stdDomainParam参数?在后来的版本中,它是:
try {
CardAccessFile cardAccessFile = new CardAccessFile(service.getInputStream(PassportService.EF_CARD_ACCESS));
Collection<PACEInfo> paceInfos = cardAccessFile.getPACEInfos();
if (paceInfos != null && paceInfos.size() > 0) {
PACEInfo paceInfo = paceInfos.iterator().next();
service.doPACE(bacKey, paceInfo.getObjectIdentifier(), PACEInfo.toParameterSpec(paceInfo.getParameterId()));
paceSucceeded = true;
} else {
paceSucceeded = true;
}
} catch (Exception e) {
Log.w(TAG, e);
}
在最新版本的CardAccessFile中,仅返回SecurityInfo。getProtocolOIDString()和SecurityInfo。getObjectIdentifier()
CardAccessFile cardAccessFile = new CardAccessFile(passportService.getInputStream(PassportService.EF_CARD_ACCESS));
Collection<SecurityInfo> securityInfos = cardAccessFile.getSecurityInfos();
SecurityInfo securityInfo = securityInfos.iterator().next();
passportService.doPACE(bacKey, securityInfo.getObjectIdentifier(), PACEInfo.toParameterSpec(?????) );
# 1 楼答案
测试及测试;工作
# 2 楼答案