JMRTD 0.4.6

org.jmrtd.lds
Class DG14File

java.lang.Object
  extended by org.jmrtd.lds.PassportFile
      extended by org.jmrtd.lds.DataGroup
          extended by org.jmrtd.lds.DG14File

public class DG14File
extends DataGroup

Data Group 14 stores a set of SecurityInfos for Extended Access Control, see EAC 1.11 spec. To us the interesting bits are: the map of public (EC or DH) keys, the map of protocol identifiers which should match the key's map (not checked here!), and the file identifier of the efCVCA file.

Author:
Wojciech Mostowski

Field Summary
 
Fields inherited from class org.jmrtd.lds.PassportFile
EF_COM_TAG, EF_DG1_TAG, EF_DG10_TAG, EF_DG11_TAG, EF_DG12_TAG, EF_DG13_TAG, EF_DG14_TAG, EF_DG15_TAG, EF_DG16_TAG, EF_DG2_TAG, EF_DG3_TAG, EF_DG4_TAG, EF_DG5_TAG, EF_DG6_TAG, EF_DG7_TAG, EF_DG8_TAG, EF_DG9_TAG, EF_SOD_TAG
 
Constructor Summary
DG14File(InputStream in)
          Constructs a new DG14 file from the data in in.
DG14File(List<SecurityInfo> securityInfos)
          Constructs a new DG14 file from the provided data.
DG14File(Map<Integer,PublicKey> publicKeys, Map<Integer,DERObjectIdentifier> chipInfoMap, List<Integer> cvcaFileIdList, Map<Integer,Integer> cvcaShortFileIdMap)
          Constructs a new DG14 file from the provided data.
 
Method Summary
 boolean equals(Object obj)
           
 Map<Integer,DERObjectIdentifier> getChipAuthenticationInfos()
          Returns the mapping of key identifiers to EAC protocol identifiers contained in this file.
 List<Integer> getCVCAFileIds()
          Returns the list of file identifier references to efCVCA files, possibly empty.
 byte getCVCAShortFileId(int fileId)
          Returns a corresponding short file ID.
 byte[] getEncoded()
          Gets the contents of this file as byte array, includes the ICAO tag and length.
 Map<Integer,PublicKey> getPublicKeys()
          Returns the mapping of key identifiers to public keys.
 List<SecurityInfo> getSecurityInfos()
           
 int hashCode()
           
 String toString()
          Gets a textual representation of this file.
 
Methods inherited from class org.jmrtd.lds.DataGroup
getLength, getTag
 
Methods inherited from class org.jmrtd.lds.PassportFile
createPassportFile, lookupDataGroupNumberByTag, lookupFIDByDataGroupNumber, lookupFIDByTag, lookupTagByDataGroupNumber, lookupTagByFID, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DG14File

public DG14File(List<SecurityInfo> securityInfos)
Constructs a new DG14 file from the provided data.

Parameters:
securityInfos - a list of security infos

DG14File

public DG14File(InputStream in)
Constructs a new DG14 file from the data in in.

Parameters:
in - the input stream to parse the data from

DG14File

public DG14File(Map<Integer,PublicKey> publicKeys,
                Map<Integer,DERObjectIdentifier> chipInfoMap,
                List<Integer> cvcaFileIdList,
                Map<Integer,Integer> cvcaShortFileIdMap)
Constructs a new DG14 file from the provided data.

Parameters:
publicKeys - the map of (EC or DH) public keys indexed by key identifiers. If only one key, the index can be -1.
chipInfoMap - the map of protocol identifiers for EAC indexed by key identifiers. If only one protocol identifier, the index can be -1.
cvcaFileIdList - the list of file identifiers of the efCVCA file(s)
cvcaShortFileIdMap - a mapping of file identifiers (see above) to short file identifiers (can be empty)
Method Detail

getEncoded

public byte[] getEncoded()
Description copied from class: PassportFile
Gets the contents of this file as byte array, includes the ICAO tag and length.

Specified by:
getEncoded in class DataGroup
Returns:
a byte array containing the file

getCVCAFileIds

public List<Integer> getCVCAFileIds()
Returns the list of file identifier references to efCVCA files, possibly empty.

Returns:
the list of file identifier

getCVCAShortFileId

public byte getCVCAShortFileId(int fileId)
Returns a corresponding short file ID.

Parameters:
fileId - the file ID
Returns:
an SFI for the given file ID, -1 if not present

getChipAuthenticationInfos

public Map<Integer,DERObjectIdentifier> getChipAuthenticationInfos()
Returns the mapping of key identifiers to EAC protocol identifiers contained in this file. The key identifier may be -1 if there is only one protocol identifier.

Returns:
the mapping of key identifiers to EAC protocol identifiers

getPublicKeys

public Map<Integer,PublicKey> getPublicKeys()
Returns the mapping of key identifiers to public keys. The key identifier may be -1 if there is only one key.

Returns:
the mapping of key identifiers to public keys

getSecurityInfos

public List<SecurityInfo> getSecurityInfos()

toString

public String toString()
Description copied from class: DataGroup
Gets a textual representation of this file.

Overrides:
toString in class DataGroup
Returns:
a textual representation of this file

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

JMRTD 0.4.6