public final class SignatureFormatDetectorCadesPades 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.bouncycastle.cms.SignerInformation signerInformation)
Method that checks whether an ASN.1 signature has
SignaturePolicyIdentifier element. |
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).
|
static java.lang.String |
resolveSignatureDictionaryFormat(PDFSignatureDictionary signatureDictionary)
Method that obtains the format associated to a signature dictionary of a PDF document.
|
static java.lang.String |
resolveSignerCAdESFormat(org.bouncycastle.cms.CMSSignedData signedData,
org.bouncycastle.cms.SignerInformation signerInformation)
Method that obtains the format associated to a signer of an ASN.1 signature.
|
public static java.lang.String getSignatureFormat(byte[] signature)
signature - Parameter that represents the element to evaluate. This element can be an ASN.1 signature or a PDF document.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_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 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 java.lang.String resolveSignerCAdESFormat(org.bouncycastle.cms.CMSSignedData signedData,
org.bouncycastle.cms.SignerInformation signerInformation)
signedData - Parameter that represents the signature message.signerInformation - Parameter that represents the information abput the signer to process.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.public static java.lang.String resolveSignatureDictionaryFormat(PDFSignatureDictionary signatureDictionary)
signatureDictionary - Parameter that represents the information about the signature dictionary.ISignatureFormatDetector.FORMAT_PADES_T_LEVEL.ISignatureFormatDetector.FORMAT_PADES_B_LEVEL.ISignatureFormatDetector.FORMAT_PDF.ISignatureFormatDetector.FORMAT_PADES_BASIC.ISignatureFormatDetector.FORMAT_PADES_BES.ISignatureFormatDetector.FORMAT_PADES_EPES.ISignatureFormatDetector.FORMAT_UNRECOGNIZED.