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

com.ibm.opencard.signature
Class MFCSignatureFactory

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

public final class MFCSignatureFactory
extends java.lang.Object

A factory class for MFC signature service objects. Here, the term factory refers to the design technique, not to OCF card service factories. The signature services implement the interfaces ... This class allows to create appropriate implementations of these services, along with some other helper objects.

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

Method Summary
static MFCKeyInfoRParser get40KIParser(int cos)
          Returns a key info parser for the 4.0 card The parser is created on the first invocation and re-used later.
static MFCKeyInfoRParser get421KIParser(int cos)
          Returns a key info parser for the 4.21 card The parser is created on the first invocation and re-used later.
static MFCKeyInfoRParser getKIParser(int cos)
          Returns a key info parser for the given CardOS.
static MFCSigCodes getSigCodes(int cos)
          Returns signature command codes for the given CardOS.
static MFCSignatureImpl getSigImpl(int cos)
          Returns a signature service implementation for the given CardOS.
static void initSigParam(MFCSignatureParameter param, int cos)
          Initializes a MFCSignatureParameter.
static MFCSignatureParameter newSigParam(CardServiceScheduler scheduler, SmartCard smartcard, boolean blocking, int cos)
          Returns a new, initialized parameter for creating a signature service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get40KIParser

public static MFCKeyInfoRParser get40KIParser(int cos)
Returns a key info parser for the 4.0 card The parser is created on the first invocation and re-used later.
Parameters:
cos - the CardOS indicator, see IBMMFCConstants
Returns:
a key info parser for the 4.0 card
See Also:
IBMMFCConstants

get421KIParser

public static MFCKeyInfoRParser get421KIParser(int cos)
Returns a key info parser for the 4.21 card The parser is created on the first invocation and re-used later.
Parameters:
cos - the CardOS indicator, see IBMMFCConstants
Returns:
a key info parser for the 4.21 card
See Also:
IBMMFCConstants

getKIParser

public static MFCKeyInfoRParser getKIParser(int cos)
Returns a key info parser for the given CardOS. The parser is created on the first invocation and re-used later.
Parameters:
cos - the CardOS indicator, see IBMMFCConstants
Returns:
a key info parser for the CardOS
See Also:
IBMMFCConstants

getSigCodes

public static MFCSigCodes getSigCodes(int cos)
Returns signature command codes for the given CardOS.
Parameters:
cos - the CardOS indicator, see IBMMFCConstants
Returns:
signature command codes for the CardOS
See Also:
IBMMFCConstants

getSigImpl

public static MFCSignatureImpl getSigImpl(int cos)
Returns a signature service implementation for the given CardOS.
Parameters:
cos - the CardOS indicator, see IBMMFCConstants
Returns:
a signature service implementation for the CardOS
See Also:
IBMMFCConstants

initSigParam

public static void initSigParam(MFCSignatureParameter param,
                                int cos)
Initializes a MFCSignatureParameter. The parameter gets initialized with a signature service implementation and a key info parser. The generic parts are initialized by invoking MFCGenericFactory.initParameter.
Parameters:
param - the parameter object to initialize
cos - the card OS to support, see IBMMFCConstants
See Also:
MFCGenericFactory.initParameter(com.ibm.opencard.service.MFCCardServiceParameter, int), IBMMFCConstants

newSigParam

public static MFCSignatureParameter newSigParam(CardServiceScheduler scheduler,
                                                SmartCard smartcard,
                                                boolean blocking,
                                                int cos)
Returns a new, initialized parameter for creating a signature service. The parameter is initialized by invoking initSigParam.
Parameters:
scheduler - where to allocate channels, gets stored in the parameter
smartcard - the smartcard to support, gets stored in the parameter
blocking - whether to operate blocking, gets stored in the parameter
cos - card os
Returns:
a parameter for instantiating MFCSignatureService
See Also:
initSigParam(com.ibm.opencard.signature.MFCSignatureParameter, int), MFCSignatureService#MFCSignatureService(com.ibm.opencard.signature.MFCSignatureParameter)