Package es.gob.afirma.signature
Class SignatureFormatDetectorCommons
- java.lang.Object
-
- es.gob.afirma.signature.SignatureFormatDetectorCommons
-
- All Implemented Interfaces:
ISignatureFormatDetector
public final class SignatureFormatDetectorCommons 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@.
- Version:
- 1.2, 04/03/2020.
-
-
Field Summary
-
Fields inherited from interface es.gob.afirma.signature.ISignatureFormatDetector
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
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisASiCFormat(byte[] signature)Method that indicates if a signature has the ASiC-S format (true) or not (false).static booleanisXMLFormat(byte[] signature)Method that indicates whether a signature is XML (true) or not (false).
-
-
-
Method Detail
-
isXMLFormat
public static boolean isXMLFormat(byte[] signature)
Method that indicates whether a signature is XML (true) or not (false).- Parameters:
signature- Parameter that represents the signature to check.- Returns:
- a boolean that indicates whether a signature is XML (true) or not (false).
-
isASiCFormat
public static boolean isASiCFormat(byte[] signature)
Method that indicates if a signature has the ASiC-S format (true) or not (false).- Parameters:
signature- Parameter that represents a ZIP file.- Returns:
- a boolean that indicates if the signature has the ASiC-S format (true) or not (false).
-
-