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

com.ibm.opencard.signature
Class MFC421KeyGenImpl

java.lang.Object
  |
  +--com.ibm.opencard.signature.MFC421KeyGenImpl

public class MFC421KeyGenImpl
extends java.lang.Object
implements MFCKeyGenImpl

Helper class for implementation of a key generation card service for MFC 4.21 and compatible. Send APDUs to the card. The methods that send APDUs are synchronized simply to reuse the APDU buffers.

Version:
$Id: MFC421KeyGenImpl.java,v 1.1 1999/12/02 16:06:09 damke Exp $
See Also:
KeyGenerationCardService, MFCKeyGenService

Field Summary
protected  MFCSigCodes mfcCodes
          The CLAss and INStruction bytes for commands.
 
Constructor Summary
MFC421KeyGenImpl(MFCSigCodes codes)
          Instantiates a new key import service implementation.
 
Method Summary
 void generateKeyPair(MFCCardChannel channel, MFCKeyInfo privateki)
          Send the command APDU for generate key pair
protected  MFCCommandAPDU getGenKeyAPDU(int keyNr)
          get APDU for generate key command
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mfcCodes

protected MFCSigCodes mfcCodes
The CLAss and INStruction bytes for commands.
Constructor Detail

MFC421KeyGenImpl

public MFC421KeyGenImpl(MFCSigCodes codes)
Instantiates a new key import service implementation.
Parameters:
codes - the command codes for the MFC card to support
Method Detail

generateKeyPair

public void generateKeyPair(MFCCardChannel channel,
                            MFCKeyInfo privateki)
                     throws CardServiceException,
                            CardTerminalException
Send the command APDU for generate key pair
Specified by:
generateKeyPair in interface MFCKeyGenImpl
Parameters:
channel - com.ibm.opencard.service.MFCCardChannel
privateki - key file info of private key
Throws:
CardServiceException - any subclass of CardServiceException
CardTerminalException - any subclass of CardTerminalException

getGenKeyAPDU

protected MFCCommandAPDU getGenKeyAPDU(int keyNr)
get APDU for generate key command
Returns:
com.ibm.opencard.service.MFCCommandAPDU