Manifest
中定义的XML Manifest
元素的表示 。
XML Schema Definition定义为:
<element name="Manifest" type="ds:ManifestType"/> <complexType name="ManifestType"> <sequence> <element ref="ds:Reference" maxOccurs="unbounded"/> </sequence> <attribute name="Id" type="ID" use="optional"/> </complexType>
可以通过调用XMLSignatureFactory
类的newManifest
方法之一来创建Manifest
实例;
例如:
XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM");
Reference ref = factory.newReference("#reference-1", DigestMethod.SHA1);
List<Reference> references = Collections.singletonList(ref);
Manifest manifest = factory.newManifest(references, "manifest-1");