javax.xml.crypto.dsig.Reference.getId()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中javax.xml.crypto.dsig.Reference.getId方法的一些代码示例,展示了Reference.getId的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reference.getId方法的具体详情如下:
包路径:javax.xml.crypto.dsig.Reference
类名称:Reference
方法名:getId

Reference.getId介绍

[英]Returns the optional Id attribute of this Reference, which permits this reference to be referenced from elsewhere.
[中]返回此Reference的可选Id属性,该属性允许从其他地方引用此引用。

代码示例

代码示例来源:origin: net.java.xades/jxades

public InvalidSignatureReason(Reference reference)
{
  invalidSignature = InvalidSignature.BAD_REFERENCE;
  StringBuilder sb = new StringBuilder();
  sb.append("Bad reference");
  String id = reference.getId();
  if (id != null && (id = id.trim()).length() > 0)
    sb.append(" with Id '").append(id).append("'");
  String uri = reference.getURI();
  if (uri != null && (uri = uri.trim()).length() > 0)
  {
    if (id != null && id.length() > 0)
      sb.append(" and URI = '");
    else
      sb.append(" with URI = '");
    sb.append(uri).append("'");
  }
  reason = sb.toString();
}

代码示例来源: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

if (r.getId() == null) {
        trans,
        r.getType(),
        r.getId()

代码示例来源:origin: org.picketlink/picketlink-fed

for (Reference ref : references)
 log.trace("[Ref id=" + ref.getId() + ":uri=" + ref.getURI() + "]validity status:"
    + ref.validate(valContext));

代码示例来源:origin: org.picketlink/picketlink-fed-core

for (Reference ref : references)
 log.trace("[Ref id=" + ref.getId() + ":uri=" + ref.getURI() + "]validity status:"
    + ref.validate(valContext));

代码示例来源:origin: com.hynnet/xws-security

for (int j=0; i.hasNext(); j++) {
  Reference ref = (Reference) i.next();
  logger.log(Level.FINEST,"Reference ID "+ref.getId());
  logger.log(Level.FINEST,"Reference URI "+ref.getURI());
  boolean refValid =

代码示例来源:origin: org.apache.santuario/xmlsec

List<Reference> refs = DOMSignedInfo.getSignedInfoReferences(si);
for (Reference ref : refs) {
  signatureIdMap.put(ref.getId(), ref);
      for (Reference ref : manRefs) {
        allReferences.add(ref);
        signatureIdMap.put(ref.getId(), ref);

代码示例来源:origin: picketlink/picketlink

logger.trace("[Ref id=" + ref.getId() + ":uri=" + ref.getURI() + "]validity status:" + ref.validate(valContext));

代码示例来源:origin: org.picketlink/picketlink-federation

logger.trace("[Ref id=" + ref.getId() + ":uri=" + ref.getURI() + "]validity status:" + ref.validate(valContext));

代码示例来源:origin: org.picketlink/picketlink-common

logger.trace("[Ref id=" + ref.getId() + ":uri=" + ref.getURI() + "]validity status:" + ref.validate(valContext));

代码示例来源:origin: org.picketlink/picketlink-core

logger.trace("[Ref id=" + ref.getId() + ":uri=" + ref.getURI() + "]validity status:" + ref.validate(valContext));

代码示例来源:origin: org.apache.ws.security/wss4j

Reference reference = (Reference)referenceIterator.next();
boolean referenceValidationCheck = reference.validate(context);
String id = reference.getId();
if (id == null) {
  id = reference.getURI();

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j

Reference reference = (Reference)referenceIterator.next();
boolean referenceValidationCheck = reference.validate(context);
String id = reference.getId();
if (id == null) {
  id = reference.getURI();

代码示例来源:origin: com.hynnet/xws-security

for (int j=0; i.hasNext(); j++) {
  Reference ref = (Reference) i.next();
  logger.log(Level.FINEST,"Reference ID "+ref.getId());
  logger.log(Level.FINEST,"Reference URI "+ref.getURI());
  boolean refValid =

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

Reference reference = (Reference)referenceIterator.next();
boolean referenceValidationCheck = reference.validate(context);
String id = reference.getId();
if (id == null) {
  id = reference.getURI();

相关文章