com.aspose.words
Class XmlDsigLevel

java.lang.Object
    extended by com.aspose.words.XmlDsigLevel

public class XmlDsigLevel 
extends java.lang.Object

Utility class containing constants. Specifies the level of a digital signature based on XML-DSig standard.

Example:

Shows how to sign document based on XML-DSig standard.
CertificateHolder certificateHolder = CertificateHolder.create(getMyDir() + "morzal.pfx", "aw");
SignOptions signOptions = new SignOptions(); { signOptions.setXmlDsigLevel(XmlDsigLevel.X_AD_ES_EPES); }

String inputFileName = getMyDir() + "Document.docx";
String outputFileName = getArtifactsDir() + "DigitalSignatureUtil.XmlDsig.docx";
DigitalSignatureUtil.sign(inputFileName, outputFileName, certificateHolder, signOptions);

Field Summary
static final intXML_D_SIG = 0
           Specifies XML-DSig signature level.
static final intX_AD_ES_EPES = 1
           Specifies XAdES-EPES signature level.
 

Field Detail

XML_D_SIG = 0

public static final int XML_D_SIG
Specifies XML-DSig signature level. A simple digital signature that should not be trusted after its signing certificate expires.

X_AD_ES_EPES = 1

public static final int X_AD_ES_EPES
Specifies XAdES-EPES signature level. Adds information about the signing certificate to the XML-DSig signature. A malicious user cannot switch the signing certificate for another certificate with the same public/private key.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.