當前位置: 首頁>>代碼示例>>Java>>正文


Java XMLSignatureFactory.getURIDereferencer方法代碼示例

本文整理匯總了Java中javax.xml.crypto.dsig.XMLSignatureFactory.getURIDereferencer方法的典型用法代碼示例。如果您正苦於以下問題:Java XMLSignatureFactory.getURIDereferencer方法的具體用法?Java XMLSignatureFactory.getURIDereferencer怎麽用?Java XMLSignatureFactory.getURIDereferencer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.xml.crypto.dsig.XMLSignatureFactory的用法示例。


在下文中一共展示了XMLSignatureFactory.getURIDereferencer方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: LocalHttpCacheURIDereferencer

import javax.xml.crypto.dsig.XMLSignatureFactory; //導入方法依賴的package包/類
public LocalHttpCacheURIDereferencer() {
    XMLSignatureFactory xmlSignatureFactory =
        XMLSignatureFactory.getInstance("DOM", new org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI());
    ud = xmlSignatureFactory.getURIDereferencer();
    String base = BASEDIR == null ? "./": BASEDIR;
    File dir = new File(base + FS + "src/test/resources" + FS + "javax" +
        FS + "xml" + FS + "crypto" + FS + "dsig");
    uriMap = new HashMap<String, File>();
    uriMap.put("http://www.w3.org/TR/xml-stylesheet",
               new File(dir, "xml-stylesheet"));
    uriMap.put("http://www.w3.org/Signature/2002/04/xml-stylesheet.b64",
               new File(dir, "xml-stylesheet.b64"));
    uriMap.put("http://www.ietf.org/rfc/rfc3161.txt",
               new File(dir, "rfc3161.txt"));
}
 
開發者ID:Legostaev,項目名稱:xmlsec-gost,代碼行數:16,代碼來源:LocalHttpCacheURIDereferencer.java

示例2: ODFURIDereferencer

import javax.xml.crypto.dsig.XMLSignatureFactory; //導入方法依賴的package包/類
private ODFURIDereferencer(URL odfUrl, byte[] odfData) {
	if (null == odfUrl && null == odfData) {
		throw new IllegalArgumentException("odfUrl and odfData are null");
	}
	if (null != odfUrl && null != odfData) {
		throw new IllegalArgumentException("odfUrl and odfData are both not null");
	}
	this.odfUrl = odfUrl;
	this.odfData = odfData;
	XMLSignatureFactory xmlSignatureFactory = XMLSignatureFactory.getInstance();
	this.baseUriDereferener = xmlSignatureFactory.getURIDereferencer();

	DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
	documentBuilderFactory.setNamespaceAware(true);

	try {
		this.documentBuilder = documentBuilderFactory.newDocumentBuilder();
	} catch (ParserConfigurationException e) {
		throw new RuntimeException("parser config error: " + e.getMessage(), e);
	}
	EntityResolver entityResolver = new ODFEntityResolver();
	this.documentBuilder.setEntityResolver(entityResolver);
}
 
開發者ID:e-Contract,項目名稱:eid-applet,代碼行數:24,代碼來源:ODFURIDereferencer.java

示例3: ASiCURIDereferencer

import javax.xml.crypto.dsig.XMLSignatureFactory; //導入方法依賴的package包/類
protected ASiCURIDereferencer(byte[] data, File tmpFile) {
	this.data = data;
	this.tmpFile = tmpFile;

	XMLSignatureFactory xmlSignatureFactory = XMLSignatureFactory.getInstance();
	this.baseUriDereferener = xmlSignatureFactory.getURIDereferencer();
}
 
開發者ID:e-Contract,項目名稱:eid-applet,代碼行數:8,代碼來源:ASiCURIDereferencer.java

示例4: OOXMLURIDereferencer

import javax.xml.crypto.dsig.XMLSignatureFactory; //導入方法依賴的package包/類
protected OOXMLURIDereferencer(byte[] ooxmlDocument, URL ooxmlUrl) {
	if (null == ooxmlUrl && null == ooxmlDocument) {
		throw new IllegalArgumentException("need some reference to the OOXML document");
	}
	this.ooxmlUrl = ooxmlUrl;
	this.ooxmlDocument = ooxmlDocument;
	XMLSignatureFactory xmlSignatureFactory = XMLSignatureFactory.getInstance();
	this.baseUriDereferencer = xmlSignatureFactory.getURIDereferencer();
}
 
開發者ID:e-Contract,項目名稱:eid-applet,代碼行數:10,代碼來源:OOXMLURIDereferencer.java


注:本文中的javax.xml.crypto.dsig.XMLSignatureFactory.getURIDereferencer方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。