Class SodFile
-
- All Implemented Interfaces:
-
java.io.Serializable,org.jmrtd.lds.LDSElement,org.jmrtd.lds.LDSFile
public class SodFile extends AbstractTaggedLDSFile
Represents the SOD file (Document Security Object).
-
-
Method Summary
Modifier and Type Method Description intgetLength()Array<byte>getEncoded()Not Implemented. StringgetDigestAlgorithm()The hash algorithm that was used to calculate the hash values of the DataGroups. Map<Integer, Array<byte>>getDataGroupHashes()Convenience method to extract the DataGroup hashes from the LDS Security Object. booleanisSignatureValid()Whether the signature of the signed content could be verified with the public key of the document certificate. ExceptiongetSignatureVerifyException()LDSSecurityObjectgetLdsSecurityObject()The LDS Security object. X509CertificategetDocumentCertificate()The Document Signing Certificate that was used to sign the LDS Security Object. -
-
Method Detail
-
getLength
int getLength()
-
getEncoded
Array<byte> getEncoded()
Not Implemented. Throws IllegalStateException.
- To encode a SODFile use the org.jmrtd.lds.org.jmrtd.lds.SODFile class instead.
- To access the raw binary bytes of the SodFile use sodRawBinary
-
getDigestAlgorithm
String getDigestAlgorithm()
The hash algorithm that was used to calculate the hash values of the DataGroups.
- Returns:
the common mnemonic string (such as "SHA1", "SHA-256")
-
getDataGroupHashes
Map<Integer, Array<byte>> getDataGroupHashes()
Convenience method to extract the DataGroup hashes from the LDS Security Object. Returns a hash value for each DataGroup that is present on the chip.
- Returns:
a map with the hash values. Use the DataGroup Number (1-16) as the key.
-
isSignatureValid
boolean isSignatureValid()
Whether the signature of the signed content could be verified with the public key of the document certificate.
- Returns:
true if signed content could be verified.
-
getSignatureVerifyException
Exception getSignatureVerifyException()
- Returns:
non null if an Exception occurred when verifying the signature.
-
getLdsSecurityObject
LDSSecurityObject getLdsSecurityObject()
The LDS Security object.
- Returns:
parsed signed-content of the SOD file, a LDS Security Object.
-
getDocumentCertificate
X509Certificate getDocumentCertificate()
The Document Signing Certificate that was used to sign the LDS Security Object.
- Returns:
Document Signing Certificate
-
-
-
-