public final class SignatureFormatDetector extends java.lang.Object implements ISignatureFormatDetector
Class that contains all the functionality related to recognize the signature formats.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
CADES_BASIC_FORMAT, FORMAT_ASIC_S_B_LEVEL, FORMAT_ASIC_S_LT_LEVEL, FORMAT_ASIC_S_LTA_LEVEL, FORMAT_ASIC_S_T_LEVEL, FORMAT_CADES_A, FORMAT_CADES_B_LEVEL, FORMAT_CADES_BES, FORMAT_CADES_C, FORMAT_CADES_EPES, FORMAT_CADES_LT_LEVEL, FORMAT_CADES_LTA_LEVEL, FORMAT_CADES_T, FORMAT_CADES_T_LEVEL, FORMAT_CADES_X1, FORMAT_CADES_X2, FORMAT_CADES_XL1, FORMAT_CADES_XL2, FORMAT_CMS, FORMAT_CMS_T, FORMAT_PADES_B_LEVEL, FORMAT_PADES_BASIC, FORMAT_PADES_BES, FORMAT_PADES_EPES, FORMAT_PADES_LT_LEVEL, FORMAT_PADES_LTA_LEVEL, FORMAT_PADES_LTV, FORMAT_PADES_T_LEVEL, FORMAT_PDF, FORMAT_UNRECOGNIZED, FORMAT_XADES_A, FORMAT_XADES_B_LEVEL, FORMAT_XADES_BES, FORMAT_XADES_C, FORMAT_XADES_EPES, FORMAT_XADES_LT_LEVEL, FORMAT_XADES_LTA_LEVEL, FORMAT_XADES_T, FORMAT_XADES_T_LEVEL, FORMAT_XADES_X1, FORMAT_XADES_X2, FORMAT_XADES_XL1, FORMAT_XADES_XL2, PKCS7_BASIC_FORMAT| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getSignatureFormat(byte[] signature)
Method that obtains the format of a signature.
|
static boolean |
hasSignaturePolicyIdentifier(org.w3c.dom.Element dsSignature)
Method that checks whether a XML signature has
SignaturePolicyIdentifier element. |
static boolean |
hasSignaturePolicyIdentifier(org.bouncycastle.cms.SignerInformation signerInformation)
Method that checks whether an ASN.1 signature has
SignaturePolicyIdentifier element. |
static boolean |
isASiCFormat(byte[] signature)
Method that indicates if a signature has the ASiC-S format (true) or not (false).
|
static boolean |
isASN1Format(byte[] signature)
Method that indicates whether a signature is ASN.1 (true) or not (false).
|
static boolean |
isPAdESBasic(PDFSignatureDictionary signatureDictionary)
Method that indicates whether a signature dictionary has PAdES-Basic signature format (true) or not (false).
|
static boolean |
isPAdESBES(PDFSignatureDictionary signatureDictionary)
Method that indicates whether a signature dictionary has PAdES-BES signature format (true) or not (false).
|
static boolean |
isPAdESEPES(PDFSignatureDictionary signatureDictionary)
Method that indicates whether a signature dictionary has PAdES-EPES signature format (true) or not (false).
|
static boolean |
isPDF(PDFSignatureDictionary signatureDictionary)
Method that indicates whether a signature dictionary has PDF signature format (true) or not (false).
|
static boolean |
isPDFFormat(byte[] signature)
Method that indicates whether a signature is PDF (true) or not (false).
|
static boolean |
isXMLFormat(byte[] signature)
Method that indicates whether a signature is XML (true) or not (false).
|
public static java.lang.String getSignatureFormat(byte[] signature)
signature - Parameter that represents the element to evaluate. This element can be an ASN.1 signature, a XML document, a PDF document or a ZIP file.ISignatureFormatDetector.FORMAT_CADES_LTA_LEVEL.ISignatureFormatDetector.FORMAT_CADES_LT_LEVEL.ISignatureFormatDetector.FORMAT_CADES_T_LEVEL.ISignatureFormatDetector.FORMAT_CADES_B_LEVEL.ISignatureFormatDetector.FORMAT_CADES_A.ISignatureFormatDetector.FORMAT_CADES_XL2.ISignatureFormatDetector.FORMAT_CADES_XL1.ISignatureFormatDetector.FORMAT_CADES_X2.ISignatureFormatDetector.FORMAT_CADES_X1.ISignatureFormatDetector.FORMAT_CADES_T.ISignatureFormatDetector.FORMAT_CADES_C.ISignatureFormatDetector.FORMAT_CADES_BES.ISignatureFormatDetector.FORMAT_CADES_EPES.ISignatureFormatDetector.FORMAT_UNRECOGNIZED.ISignatureFormatDetector.FORMAT_XADES_LTA_LEVEL.ISignatureFormatDetector.FORMAT_XADES_LT_LEVEL.ISignatureFormatDetector.FORMAT_XADES_T_LEVEL.ISignatureFormatDetector.FORMAT_XADES_B_LEVEL.ISignatureFormatDetector.FORMAT_XADES_A.ISignatureFormatDetector.FORMAT_XADES_XL2.ISignatureFormatDetector.FORMAT_XADES_XL1.ISignatureFormatDetector.FORMAT_XADES_X2.ISignatureFormatDetector.FORMAT_XADES_X1.ISignatureFormatDetector.FORMAT_XADES_T.ISignatureFormatDetector.FORMAT_XADES_C.ISignatureFormatDetector.FORMAT_XADES_BES.ISignatureFormatDetector.FORMAT_XADES_EPES.ISignatureFormatDetector.FORMAT_UNRECOGNIZED.ISignatureFormatDetector.FORMAT_PADES_LTA_LEVEL.ISignatureFormatDetector.FORMAT_PADES_LT_LEVEL.ISignatureFormatDetector.FORMAT_PADES_T_LEVEL.ISignatureFormatDetector.FORMAT_PADES_B_LEVEL.ISignatureFormatDetector.FORMAT_PADES_LTV.ISignatureFormatDetector.FORMAT_PADES_EPES.ISignatureFormatDetector.FORMAT_PADES_BES.ISignatureFormatDetector.FORMAT_PADES_BASIC.ISignatureFormatDetector.FORMAT_PDF.ISignatureFormatDetector.FORMAT_UNRECOGNIZED.public static boolean isASiCFormat(byte[] signature)
signature - Parameter that represents a ZIP file.public static boolean isASN1Format(byte[] signature)
signature - Parameter that represents the signature to check.public static boolean isXMLFormat(byte[] signature)
signature - Parameter that represents the signature to check.public static boolean isPDFFormat(byte[] signature)
signature - Parameter that represents the signature to check.public static boolean isPAdESEPES(PDFSignatureDictionary signatureDictionary)
signatureDictionary - Parameter that represents the signature dictionary.public static boolean isPAdESBES(PDFSignatureDictionary signatureDictionary)
signatureDictionary - Parameter that represents the signature dictionary.public static boolean isPAdESBasic(PDFSignatureDictionary signatureDictionary)
signatureDictionary - Parameter that represents the signature dictionary.public static boolean isPDF(PDFSignatureDictionary signatureDictionary)
signatureDictionary - Parameter that represents the signature dictionary.public static boolean hasSignaturePolicyIdentifier(org.bouncycastle.cms.SignerInformation signerInformation)
SignaturePolicyIdentifier element.signerInformation - Parameter that represents the information about the signer.SignaturePolicyIdentifier element (true) or not (false).public static boolean hasSignaturePolicyIdentifier(org.w3c.dom.Element dsSignature)
SignaturePolicyIdentifier element.dsSignature - Parameter that represents Signature element.SignaturePolicyIdentifier element (true) or not (false).