本文整理汇总了Java中javax.xml.crypto.dsig.Manifest类的典型用法代码示例。如果您正苦于以下问题:Java Manifest类的具体用法?Java Manifest怎么用?Java Manifest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Manifest类属于javax.xml.crypto.dsig包,在下文中一共展示了Manifest类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addManifestReferencedObjects
import javax.xml.crypto.dsig.Manifest; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected void addManifestReferencedObjects(List<XMLObject> allObjects, List<XMLObject> referencedObjects, String manifestId) {
Manifest manifest = getReferencedManifest(allObjects, manifestId);
if (manifest == null) {
return;
}
for (Reference manifestRef : (List<Reference>) manifest.getReferences()) {
String manifestRefUri = getSameDocumentReferenceUri(manifestRef);
if (manifestRefUri == null) {
continue;
}
XMLObject manifestReferencedOb = getReferencedObject(allObjects, manifestRefUri);
if (manifestReferencedOb != null) {
referencedObjects.add(manifestReferencedOb);
}
}
}
示例2: getReferencedManifest
import javax.xml.crypto.dsig.Manifest; //导入依赖的package包/类
protected Manifest getReferencedManifest(List<XMLObject> objects, String id) {
for (XMLObject xo : objects) {
@SuppressWarnings("unchecked")
List<XMLStructure> content = xo.getContent();
for (XMLStructure xs : content) {
if (xs instanceof Manifest) {
Manifest man = (Manifest) xs;
if (id.equals(man.getId())) {
return man;
}
}
}
}
return null;
}
示例3: addManifestObject
import javax.xml.crypto.dsig.Manifest; //导入依赖的package包/类
private void addManifestObject(XMLSignatureFactory signatureFactory, Document document, String signatureId,
List<Reference> references, List<XMLObject> objects)
throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {
Manifest manifest = constructManifest(signatureFactory, document);
String objectId = "idPackageObject"; // really has to be this value.
List<XMLStructure> objectContent = new LinkedList<XMLStructure>();
objectContent.add(manifest);
addSignatureTime(signatureFactory, document, signatureId, objectContent);
objects.add(signatureFactory.newXMLObject(objectContent, objectId, null, null));
DigestMethod digestMethod = signatureFactory.newDigestMethod(this.digestAlgo.getXmlAlgoId(), null);
Reference reference = signatureFactory.newReference("#" + objectId, digestMethod, null,
"http://www.w3.org/2000/09/xmldsig#Object", null);
references.add(reference);
}
示例4: constructManifest
import javax.xml.crypto.dsig.Manifest; //导入依赖的package包/类
private Manifest constructManifest(XMLSignatureFactory signatureFactory, Document document)
throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {
List<Reference> manifestReferences = new LinkedList<Reference>();
try {
addManifestReferences(signatureFactory, document, manifestReferences);
} catch (Exception e) {
throw new RuntimeException("error: " + e.getMessage(), e);
}
return signatureFactory.newManifest(manifestReferences);
}
示例5: marshalObject
import javax.xml.crypto.dsig.Manifest; //导入依赖的package包/类
@Override
public void marshalObject(XmlWriter xwriter, Manifest toMarshal, String dsPrefix,
XMLCryptoContext context) throws MarshalException {
DOMManifest.marshal(xwriter, toMarshal, dsPrefix, context);
}
示例6: newManifest
import javax.xml.crypto.dsig.Manifest; //导入依赖的package包/类
public Manifest newManifest(List references) {
throw new UnsupportedOperationException();
}