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

com.ibm.opencard.signature
Class MFC40KeyInfoRParser

java.lang.Object
  |
  +--com.ibm.opencard.signature.MFC40KeyInfoRParser
Direct Known Subclasses:
MFC421KeyInfoRParser

public class MFC40KeyInfoRParser
extends java.lang.Object
implements MFCKeyInfoRParser

Interpreter for smartcard responses to read key info commands.

Version:
$Id: MFC40KeyInfoRParser.java,v 1.1 1999/12/02 16:06:08 damke Exp $
See Also:
MFCKeyInfo

Field Summary
protected  MFCAccessParser accessParser
          The underlying parser for access conditions.
protected static byte FILE_HEADER_TAG
          The standard ASN.1 tag for a MFC file header.
 
Constructor Summary
MFC40KeyInfoRParser(MFCAccessParser accpar)
          Creates a new key info response parser for read key info.
 
Method Summary
protected  int getExtHdrOffset()
          return the offset of the PKA specific header extension
 MFCKeyInfo parseKeyInfoResponse(byte[] data)
          parse the read key info response
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_HEADER_TAG

protected static final byte FILE_HEADER_TAG
The standard ASN.1 tag for a MFC file header.

accessParser

protected MFCAccessParser accessParser
The underlying parser for access conditions.
Constructor Detail

MFC40KeyInfoRParser

public MFC40KeyInfoRParser(MFCAccessParser accpar)
Creates a new key info response parser for read key info.
Parameters:
accpar - a parser for access conditions, which are part of the read key info response
Method Detail

getExtHdrOffset

protected int getExtHdrOffset()
return the offset of the PKA specific header extension

parseKeyInfoResponse

public MFCKeyInfo parseKeyInfoResponse(byte[] data)
                                throws BadHeaderException
parse the read key info response
Specified by:
parseKeyInfoResponse in interface MFCKeyInfoRParser
Parameters:
response - the byte array returned as response from the read key info command
Returns:
MFCKeyInfo describing the key
Throws:
BadHeaderException - Invalid response format