use of org.openecard.common.anytype.AuthDataResponse in project open-ecard by ecsec.
the class EAC2OutputType method getAuthDataType.
/**
* Returns the DIDAuthenticationDataType.
*
* @return DIDAuthenticationDataType
*/
public DIDAuthenticationDataType getAuthDataType() {
AuthDataResponse authResponse = authMap.createResponse(new iso.std.iso_iec._24727.tech.schema.EAC2OutputType());
if (challenge != null) {
authResponse.addElement(CHALLENGE, ByteUtils.toHexString(challenge));
} else {
authResponse.addElement(EF_CARDSECURITY, ByteUtils.toHexString(efCardSecurity));
authResponse.addElement(TOKEN, ByteUtils.toHexString(token));
authResponse.addElement(NONCE, ByteUtils.toHexString(nonce));
}
return authResponse.getResponse();
}
Aggregations