use of org.openecard.common.util.ByteArrayWrapper in project open-ecard by ecsec.
the class CardStateEntry method checkDataSetSecurityCondition.
public boolean checkDataSetSecurityCondition(byte[] cardApplication, String dataSetName, Enum<?> serviceAction) {
CardApplicationWrapper application = this.infoObject.getCardApplications().get(new ByteArrayWrapper(cardApplication));
DataSetInfoWrapper dataSetInfo = application.getDataSetInfo(dataSetName);
SecurityConditionType securityCondition = dataSetInfo.getSecurityCondition(serviceAction);
if (securityCondition != null) {
return checkSecurityCondition(securityCondition);
} else {
return false;
}
}
use of org.openecard.common.util.ByteArrayWrapper in project open-ecard by ecsec.
the class CardStateEntry method checkApplicationSecurityCondition.
public boolean checkApplicationSecurityCondition(byte[] applicationIdentifier, Enum<?> serviceAction) {
if (applicationIdentifier == null) {
applicationIdentifier = infoObject.getImplicitlySelectedApplication();
}
CardApplicationWrapper application = this.infoObject.getCardApplications().get(new ByteArrayWrapper(applicationIdentifier));
SecurityConditionType securityCondition = application.getSecurityCondition(serviceAction);
if (securityCondition != null) {
return checkSecurityCondition(securityCondition);
} else {
return false;
}
}
use of org.openecard.common.util.ByteArrayWrapper in project open-ecard by ecsec.
the class CardInfoWrapper method getDataSet.
/**
* @param dataSetName
* name of the data set to get the datasetinfo for
* @param applicationIdentifier
* identifier of the application containing the data set
* @return the DataSetInfo for the specified data set or null, if no such data set exists in the specified
* application
*/
public DataSetInfoType getDataSet(String dataSetName, byte[] applicationIdentifier) {
CardApplicationWrapper application = cardApplications.get(new ByteArrayWrapper(applicationIdentifier));
if (application == null) {
return null;
}
DataSetInfoWrapper dataSet = application.getDataSetInfo(dataSetName);
if (dataSet == null) {
return null;
} else {
return dataSet.getDataSetInfo();
}
}
use of org.openecard.common.util.ByteArrayWrapper in project open-ecard by ecsec.
the class CardInfoWrapper method getDIDInfo.
/**
* @param didName name of the did to get the DIDInfo for
* @param applicationIdentifier identifier of the application the DID belongs to
* @return the DIDInfo of the specified DID or null, if either the card application or the DID do not exist
*/
public DIDInfoType getDIDInfo(String didName, byte[] applicationIdentifier) {
CardApplicationWrapper application = this.getCardApplications().get(new ByteArrayWrapper(applicationIdentifier));
if (application == null) {
return null;
}
DIDInfoWrapper didInfo = application.getDIDInfo(didName);
if (didInfo == null) {
return null;
} else {
return didInfo.getDIDInfo();
}
}
use of org.openecard.common.util.ByteArrayWrapper in project open-ecard by ecsec.
the class CardStateEntry method checkDIDSecurityCondition.
public boolean checkDIDSecurityCondition(byte[] cardApplication, String didName, Enum<?> serviceAction) {
CardApplicationWrapper application = this.infoObject.getCardApplications().get(new ByteArrayWrapper(cardApplication));
DIDInfoWrapper dataSetInfo = application.getDIDInfo(didName);
SecurityConditionType securityCondition = dataSetInfo.getSecurityCondition(serviceAction);
if (securityCondition != null) {
return checkSecurityCondition(securityCondition);
} else {
return false;
}
}
Aggregations