/****************************************************************************
* Copyright (C) 2013 ecsec GmbH.
* All rights reserved.
* Contact: ecsec GmbH (info@ecsec.de)
*
* This file is part of the Open eCard App.
*
* GNU General Public License Usage
* This file may be used under the terms of the GNU General Public
* License version 3.0 as published by the Free Software Foundation
* and appearing in the file LICENSE.GPL included in the packaging of
* this file. Please review the following information to ensure the
* GNU General Public License version 3.0 requirements will be met:
* http://www.gnu.org/copyleft/gpl.html.
*
* Other Usage
* Alternatively, this file may be used in accordance with the terms
* and conditions contained in a signed written agreement between
* you and ecsec GmbH.
*
***************************************************************************/
package org.openecard.addon.sal;
import org.openecard.addon.LifecycleTrait;
import iso.std.iso_iec._24727.tech.schema.CardApplicationEndSession;
import iso.std.iso_iec._24727.tech.schema.CardApplicationEndSessionResponse;
import iso.std.iso_iec._24727.tech.schema.CardApplicationStartSession;
import iso.std.iso_iec._24727.tech.schema.CardApplicationStartSessionResponse;
import iso.std.iso_iec._24727.tech.schema.DIDAuthenticate;
import iso.std.iso_iec._24727.tech.schema.DIDAuthenticateResponse;
import iso.std.iso_iec._24727.tech.schema.DIDCreate;
import iso.std.iso_iec._24727.tech.schema.DIDCreateResponse;
import iso.std.iso_iec._24727.tech.schema.DIDDelete;
import iso.std.iso_iec._24727.tech.schema.DIDDeleteResponse;
import iso.std.iso_iec._24727.tech.schema.DIDGet;
import iso.std.iso_iec._24727.tech.schema.DIDGetResponse;
import iso.std.iso_iec._24727.tech.schema.DIDUpdate;
import iso.std.iso_iec._24727.tech.schema.DIDUpdateResponse;
import iso.std.iso_iec._24727.tech.schema.Decipher;
import iso.std.iso_iec._24727.tech.schema.DecipherResponse;
import iso.std.iso_iec._24727.tech.schema.Encipher;
import iso.std.iso_iec._24727.tech.schema.EncipherResponse;
import iso.std.iso_iec._24727.tech.schema.GetRandom;
import iso.std.iso_iec._24727.tech.schema.GetRandomResponse;
import iso.std.iso_iec._24727.tech.schema.Hash;
import iso.std.iso_iec._24727.tech.schema.HashResponse;
import iso.std.iso_iec._24727.tech.schema.Sign;
import iso.std.iso_iec._24727.tech.schema.SignResponse;
import iso.std.iso_iec._24727.tech.schema.VerifyCertificate;
import iso.std.iso_iec._24727.tech.schema.VerifyCertificateResponse;
import iso.std.iso_iec._24727.tech.schema.VerifySignature;
import iso.std.iso_iec._24727.tech.schema.VerifySignatureResponse;
import java.util.Map;
/**
*
* @author Tobias Wich <tobias.wich@ecsec.de>
*/
public interface SALProtocol extends LifecycleTrait {
Map<String, Object> getInternalData();
boolean hasNextStep(FunctionType aFunction);
boolean isFinished();
CardApplicationStartSessionResponse cardApplicationStartSession(CardApplicationStartSession aParam);
CardApplicationEndSessionResponse cardApplicationEndSession(CardApplicationEndSession aParam);
EncipherResponse encipher(Encipher aParam);
DecipherResponse decipher(Decipher aParam);
GetRandomResponse getRandom(GetRandom aParam);
HashResponse hash(Hash aParam);
SignResponse sign(Sign aParam);
VerifySignatureResponse verifySignature(VerifySignature aParam);
VerifyCertificateResponse verifyCertificate(VerifyCertificate aParam);
DIDCreateResponse didCreate(DIDCreate aParam);
DIDUpdateResponse didUpdate(DIDUpdate aParam);
DIDDeleteResponse didDelete(DIDDelete aParam);
DIDAuthenticateResponse didAuthenticate(DIDAuthenticate aParam);
boolean needsSM();
byte[] applySM(byte[] aCommandAPDU);
byte[] removeSM(byte[] aResponseAPDU);
}