public class XmlDsigLevel
extends java.lang.Object
Examples:
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);
| Modifier and Type | Field and Description |
|---|---|
static int |
length |
static int |
X_AD_ES_EPES
Specifies XAdES-EPES signature level.
|
static int |
XML_D_SIG
Specifies XML-DSig signature level.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String xmlDsigLevelName) |
static java.lang.String |
getName(int xmlDsigLevel) |
static int[] |
getValues() |
static java.lang.String |
toString(int xmlDsigLevel) |
public static int XML_D_SIG
Remarks:
A simple digital signature that should not be trusted after its signing certificate expires.
public static int X_AD_ES_EPES
Remarks:
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.
public static int length