OpenCard  
 
OCF, the OpenCard Framework is a standard Java framework for working with Smart Cards.  
 

com.ibm.opencard.signature
Interface MFCKeyImportImpl

All Known Implementing Classes:
MFC40KeyImpImpl

public abstract interface MFCKeyImportImpl

The interface to a key import card service implementation. The implementation of such a service is responsible for creating command APDUs and evaluating the smartcard's response APDUs.

Version:
$Id: MFCKeyImportImpl.java,v 1.1 1999/12/02 16:06:09 damke Exp $

Method Summary
 void importKey(MFCCardChannel channel, MFCKeyInfo ki, byte[] data, boolean isPrivate)
          Send the command APDU for import key.
 boolean validateKey(MFCCardChannel channel, int keyNr, MFCKeyInfo ki, byte[] signature, boolean isPrivate)
          Send the command APDU for validate key.
 

Method Detail

importKey

public void importKey(MFCCardChannel channel,
                      MFCKeyInfo ki,
                      byte[] data,
                      boolean isPrivate)
               throws CardServiceException,
                      CardTerminalException
Send the command APDU for import key.
Parameters:
channel - com.ibm.opencard.service.MFCCardChannel
ki - old key info
data - byte[] the key file data
isPrivate - true if a private key should be imported
Throws:
CardServiceException - any subclass of CardServiceException
CardTerminalException - any subclass of CardTerminalException

validateKey

public boolean validateKey(MFCCardChannel channel,
                           int keyNr,
                           MFCKeyInfo ki,
                           byte[] signature,
                           boolean isPrivate)
                    throws CardServiceException,
                           CardTerminalException
Send the command APDU for validate key.
Parameters:
channel - com.ibm.opencard.service.MFCCardChannel
keyNr - number of key to be verified
ki - key info of key to be used for verification of signature
signature - the signature to be verified
isPrivate - true if a private key should be validated
Throws:
CardServiceException - any subclass of CardServiceException
CardTerminalException - any subclass of CardTerminalException