本文整理了Java中javax.xml.crypto.dsig.Reference.getDigestMethod
方法的一些代码示例,展示了Reference.getDigestMethod
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reference.getDigestMethod
方法的具体详情如下:
包路径:javax.xml.crypto.dsig.Reference
类名称:Reference
方法名:getDigestMethod
[英]Returns the digest method of this Reference
.
[中]返回此Reference
的摘要方法。
代码示例来源:origin: org.apache.santuario/xmlsec
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Reference)) {
return false;
}
Reference oref = (Reference)o;
boolean idsEqual = id == null ? oref.getId() == null
: id.equals(oref.getId());
boolean urisEqual = uri == null ? oref.getURI() == null
: uri.equals(oref.getURI());
boolean typesEqual = type == null ? oref.getType() == null
: type.equals(oref.getType());
boolean digestValuesEqual =
Arrays.equals(digestValue, oref.getDigestValue());
return digestMethod.equals(oref.getDigestMethod()) && idsEqual &&
urisEqual && typesEqual &&
allTransforms.equals(oref.getTransforms()) && digestValuesEqual;
}
代码示例来源:origin: es.gob.afirma/afirma-crypto-xmlsignature
Utils.getDOMFactory().newReference(
r.getURI(),
r.getDigestMethod(),
trans,
r.getType(),
代码示例来源:origin: com.hynnet/xws-security
String algo = StreamUtil.convertDigestAlgorithm(ref.getDigestMethod().getAlgorithm());
logger.log(Level.FINE, "Digest Algorithm is "+ ref.getDigestMethod().getAlgorithm());
logger.log(Level.FINE, "Mapped Digest Algorithm is "+ algo);
代码示例来源:origin: be.fedict.eid-dss/eid-dss-document-zip
String digestAlgo = reference.getDigestMethod()
.getAlgorithm();
LOG.debug("ds:Reference digest algo: " + digestAlgo);
代码示例来源:origin: org.apache.ws.security/wss4j
ref.setProtectedElement(se);
ref.setAlgorithm(signedInfo.getSignatureMethod().getAlgorithm());
ref.setDigestAlgorithm(siRef.getDigestMethod().getAlgorithm());
代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-common
Reference reference = (Reference)refObject;
String digestMethod = reference.getDigestMethod().getAlgorithm();
Set<String> allowedDigestAlgorithms = algorithmSuite.getDigestAlgorithms();
if (!allowedDigestAlgorithms.isEmpty()
代码示例来源:origin: org.apache.ws.security/wss4j
Reference reference = (Reference)refObject;
String digestMethod = reference.getDigestMethod().getAlgorithm();
Set<String> allowedDigestAlgorithms = algorithmSuite.getDigestAlgorithms();
if (!allowedDigestAlgorithms.isEmpty()
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j
ref.setProtectedElement(se);
ref.setAlgorithm(signedInfo.getSignatureMethod().getAlgorithm());
ref.setDigestAlgorithm(siRef.getDigestMethod().getAlgorithm());
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j
Reference reference = (Reference)refObject;
String digestMethod = reference.getDigestMethod().getAlgorithm();
Set<String> allowedDigestAlgorithms = algorithmSuite.getDigestAlgorithms();
if (!allowedDigestAlgorithms.isEmpty()
代码示例来源:origin: org.apache.ws.security/wss4j
ref.setProtectedElement(token);
ref.setAlgorithm(signatureMethod);
ref.setDigestAlgorithm(reference.getDigestMethod().getAlgorithm());
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j
ref.setProtectedElement(token);
ref.setAlgorithm(signatureMethod);
ref.setDigestAlgorithm(reference.getDigestMethod().getAlgorithm());
代码示例来源:origin: com.hynnet/xws-security
target.addTransform(transform);
target.setDigestAlgorithm(ref.getDigestMethod().getAlgorithm());
if(ref.getURI().length() >0){
String Id = SecurableSoapMessage.getIdFromFragmentRef(ref.getURI());
代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom
ref.setProtectedElement(token);
ref.setAlgorithm(signatureMethod);
ref.setDigestAlgorithm(reference.getDigestMethod().getAlgorithm());
ref.setDigestValue(reference.getDigestValue());
代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom
ref.setProtectedElement(se);
ref.setAlgorithm(signedInfo.getSignatureMethod().getAlgorithm());
ref.setDigestAlgorithm(siRef.getDigestMethod().getAlgorithm());
ref.setDigestValue(siRef.getDigestValue());
ref.setAttachment(attachment);
代码示例来源:origin: com.hynnet/xws-security
public void constructSignaturePolicy(SignedInfo signedInfo, boolean isBSP,SignaturePolicy policy){
List referencesList = signedInfo.getReferences();
//SignatureMethod sm = signedInfo.getSignatureMethod();
CanonicalizationMethod cm = signedInfo.getCanonicalizationMethod();
policy.isBSP(isBSP);
SignaturePolicy.FeatureBinding featureBinding = (SignaturePolicy.FeatureBinding )policy.getFeatureBinding();
featureBinding.setCanonicalizationAlgorithm(cm.getAlgorithm());
Iterator itr = referencesList.iterator();
while(itr.hasNext()){
Reference ref = (Reference) itr.next();
SignatureTarget.Transform transform = getSignatureTransform(ref);
SignatureTarget target = new SignatureTarget();
target.isBSP(isBSP);
if(transform != null){
target.addTransform(transform);
}
target.setDigestAlgorithm(ref.getDigestMethod().getAlgorithm());
if(ref.getURI().length() >0){
target.setValue(SecurableSoapMessage.getIdFromFragmentRef(ref.getURI()));
}else{
target.setValue(ref.getURI());
}
target.setType(SignatureTarget.TARGET_TYPE_VALUE_URI);
featureBinding.addTargetBinding(target);
}
}
代码示例来源:origin: be.fedict.eid-dss/eid-dss-document-xml
String digestAlgo = reference.getDigestMethod().getAlgorithm();
LOG.debug("ds:Reference digest algo: " + digestAlgo);
byte[] digestValue = reference.getDigestValue();
内容来源于网络,如有侵权,请联系作者删除!