Package org.jmrtd.lds.icao
Class DG14File
- java.lang.Object
-
- org.jmrtd.lds.AbstractTaggedLDSFile
-
- org.jmrtd.lds.DataGroup
-
- org.jmrtd.lds.icao.DG14File
-
- All Implemented Interfaces:
Serializable
,LDSElement
,LDSFile
public class DG14File extends DataGroup
Data Group 14 stores a set of SecurityInfos for EAC and PACE, see BSI EAC 1.11 and ICAO TR-SAC-1.01. To us the interesting bits are: the map of public keys (EC or DH), the map of protocol identifiers which should match the key's map (not checked here!), and the file identifier of the efCVCA file.- Version:
- $Revision: 1761 $
- Author:
- The JMRTD team ([email protected])
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.jmrtd.lds.LDSFile
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
Constructors Constructor Description DG14File(InputStream inputStream)
Constructs a new DG14 file from the data in an input stream.DG14File(Collection<SecurityInfo> securityInfos)
Constructs a new DG14 file from the provided data.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object obj)
List<ActiveAuthenticationInfo>
getActiveAuthenticationInfos()
Deprecated.Clients should usegetSecurityInfos()
and filter that collectionList<ChipAuthenticationInfo>
getChipAuthenticationInfos()
Deprecated.Clients should usegetSecurityInfos()
and filter that collectionList<ChipAuthenticationPublicKeyInfo>
getChipAuthenticationPublicKeyInfos()
Deprecated.Clients should usegetSecurityInfos()
and filter that collectionbyte[]
getEncoded()
Returns the contents of this file as byte array, includes the ICAO tag and length.Collection<SecurityInfo>
getSecurityInfos()
Gets the security infos as an unordered collection.List<TerminalAuthenticationInfo>
getTerminalAuthenticationInfos()
Deprecated.Clients should usegetSecurityInfos()
and filter that collectionint
hashCode()
protected void
readContent(InputStream inputStream)
Reads the contents of the data group from an input stream.String
toString()
Gets a textual representation of this file.protected void
writeContent(OutputStream outputStream)
Writes the contents of the data group to an output stream.-
Methods inherited from class org.jmrtd.lds.AbstractTaggedLDSFile
getLength, getTag, readObject, writeObject
-
-
-
-
Constructor Detail
-
DG14File
public DG14File(Collection<SecurityInfo> securityInfos)
Constructs a new DG14 file from the provided data.- Parameters:
securityInfos
- a list of security infos
-
DG14File
public DG14File(InputStream inputStream) throws IOException
Constructs a new DG14 file from the data in an input stream.- Parameters:
inputStream
- the input stream to parse the data from- Throws:
IOException
- on error reading from input stream
-
-
Method Detail
-
readContent
protected void readContent(InputStream inputStream) throws IOException
Description copied from class:AbstractTaggedLDSFile
Reads the contents of the data group from an input stream. Client code implementing this method should only read the contents from the input stream, not the tag or length of the data group.- Specified by:
readContent
in classAbstractTaggedLDSFile
- Parameters:
inputStream
- the input stream to read from- Throws:
IOException
- on error reading from input stream
-
writeContent
protected void writeContent(OutputStream outputStream) throws IOException
Description copied from class:AbstractTaggedLDSFile
Writes the contents of the data group to an output stream. Client code implementing this method should only write the contents to the output stream, not the tag or length of the data group.- Specified by:
writeContent
in classAbstractTaggedLDSFile
- Parameters:
outputStream
- the output stream to write to- Throws:
IOException
- on error writing to output stream
-
getTerminalAuthenticationInfos
@Deprecated public List<TerminalAuthenticationInfo> getTerminalAuthenticationInfos()
Deprecated.Clients should usegetSecurityInfos()
and filter that collectionGets Terminal Authentication infos.- Returns:
- the Terminal Authentication infos.
-
getChipAuthenticationInfos
@Deprecated public List<ChipAuthenticationInfo> getChipAuthenticationInfos()
Deprecated.Clients should usegetSecurityInfos()
and filter that collectionReturns the Chip Authentication infos.- Returns:
- the Chip Authentication infos
-
getChipAuthenticationPublicKeyInfos
@Deprecated public List<ChipAuthenticationPublicKeyInfo> getChipAuthenticationPublicKeyInfos()
Deprecated.Clients should usegetSecurityInfos()
and filter that collectionGets 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
-
getActiveAuthenticationInfos
@Deprecated public List<ActiveAuthenticationInfo> getActiveAuthenticationInfos()
Deprecated.Clients should usegetSecurityInfos()
and filter that collectionReturns the Active Authentication security infos.- Returns:
- the Active Authentication security infos
-
getSecurityInfos
public Collection<SecurityInfo> getSecurityInfos()
Gets the security infos as an unordered collection.- Returns:
- security infos
-
toString
public String toString()
Description copied from class:DataGroup
Gets a textual representation of this file.
-
getEncoded
public byte[] getEncoded()
Returns the contents of this file as byte array, includes the ICAO tag and length.- Specified by:
getEncoded
in interfaceLDSElement
- Returns:
- a byte array containing the file
-
-