org.bouncycastle.asn1.ASN1Sequence.getObjectAt()方法的使用及代码示例

x33g5p2x  于11个月前 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(40)

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

ASN1Sequence.getObjectAt介绍

[英]Return the object at the sequence position indicated by index.
[中]在索引指示的序列位置返回对象。

代码示例

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

private PartialHashtree(final ASN1Sequence values)
{
  for (int i = 0; i != values.size(); i++)
  {
    if (!(values.getObjectAt(i) instanceof DEROctetString))
    {
      throw new IllegalArgumentException("unknown object in constructor: " + values
        .getObjectAt(i).getClass().getName());
    }
  }
  this.values = values;
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

private InfoTypeAndValue(ASN1Sequence seq)
{
  infoType = ASN1ObjectIdentifier.getInstance(seq.getObjectAt(0));
  if (seq.size() > 1)
  {
    infoValue = (ASN1Encodable)seq.getObjectAt(1);
  }
}

代码示例来源:origin: redfish64/TinyTravelTracker

private InfoTypeAndValue(ASN1Sequence seq)
{
  infoType = ASN1ObjectIdentifier.getInstance(seq.getObjectAt(0));
  if (seq.size() > 1)
  {
    infoValue = (ASN1Encodable)seq.getObjectAt(1);
  }
}

代码示例来源:origin: redfish64/TinyTravelTracker

private OcspIdentifier(ASN1Sequence seq)
{
  if (seq.size() != 2)
  {
    throw new IllegalArgumentException("Bad sequence size: "
      + seq.size());
  }
  this.ocspResponderID = ResponderID.getInstance(seq.getObjectAt(0));
  this.producedAt = (ASN1GeneralizedTime)seq.getObjectAt(1);
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

private OtherMsg(ASN1Sequence seq)
{
  if (seq.size() != 3)
  {
    throw new IllegalArgumentException("incorrect sequence size");
  }
  this.bodyPartID = BodyPartID.getInstance(seq.getObjectAt(0));
  this.otherMsgType = ASN1ObjectIdentifier.getInstance(seq.getObjectAt(1));
  this.otherMsgValue = seq.getObjectAt(2);
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

private BasicOCSPResponse(
  ASN1Sequence    seq)
{
  this.tbsResponseData = ResponseData.getInstance(seq.getObjectAt(0));
  this.signatureAlgorithm = AlgorithmIdentifier.getInstance(seq.getObjectAt(1));
  this.signature = (DERBitString)seq.getObjectAt(2);
  if (seq.size() > 3)
  {
    this.certs = ASN1Sequence.getInstance((ASN1TaggedObject)seq.getObjectAt(3), true);
  }
}

代码示例来源:origin: kaikramer/keystore-explorer

private GeneralSubtrees(ASN1Sequence seq) {
  subtrees = new ArrayList<>();
  for (int i = 0; i < seq.size(); i++) {
    subtrees.add(GeneralSubtree.getInstance(seq.getObjectAt(i)));
  }
}

代码示例来源:origin: kaikramer/keystore-explorer

private CRLDistributionPoints(ASN1Sequence seq) {
  distributionPointList = new ArrayList<>();
  for (int i = 0; i != seq.size(); i++) {
    distributionPointList.add(DistributionPoint.getInstance(seq.getObjectAt(i)));
  }
}

代码示例来源:origin: kaikramer/keystore-explorer

private SubjectInfoAccess(ASN1Sequence seq) {
  accessDescriptions = new Vector<>();
  for (int i = 0; i != seq.size(); i++) {
    accessDescriptions.add(AccessDescription.getInstance(seq.getObjectAt(i)));
  }
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

public BodyPartID[] getBodyIds()
{
  BodyPartID[] rv = new BodyPartID[bodyIds.size()];
  for (int i = 0; i != bodyIds.size(); i++)
  {
    rv[i] = BodyPartID.getInstance(bodyIds.getObjectAt(i));
  }
  return rv;
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

private ExtensionReq(
  ASN1Sequence seq)
{
  this.extensions = new Extension[seq.size()];
  for (int i = 0; i != seq.size(); i++)
  {
    extensions[i] = Extension.getInstance(seq.getObjectAt(i));
  }
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

public ESSCertID[] getCerts()
{
  ESSCertID[] cs = new ESSCertID[certs.size()];
  
  for (int i = 0; i != certs.size(); i++)
  {
    cs[i] = ESSCertID.getInstance(certs.getObjectAt(i));
  }
  
  return cs;
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

public ArchiveTimeStamp[] getArchiveTimestamps()
{
  ArchiveTimeStamp[] rv = new ArchiveTimeStamp[archiveTimestamps.size()];
  for (int i = 0; i != rv.length; i++)
  {
    rv[i] = ArchiveTimeStamp.getInstance(archiveTimestamps.getObjectAt(i));
  }
  return rv;
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

public static CertEtcToken[] arrayFromSequence(ASN1Sequence seq)
  {
    CertEtcToken[] tmp = new CertEtcToken[seq.size()];

    for (int i = 0; i != tmp.length; i++)
    {
      tmp[i] = CertEtcToken.getInstance(seq.getObjectAt(i));
    }

    return tmp;
  }
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

public InfoTypeAndValue[] toInfoTypeAndValueArray()
{
  InfoTypeAndValue[] result = new InfoTypeAndValue[content.size()];
  for (int i = 0; i != result.length; i++)
  {
    result[i] = InfoTypeAndValue.getInstance(content.getObjectAt(i));
  }
  return result;
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

private SinglePubInfo(ASN1Sequence seq)
{
  pubMethod = ASN1Integer.getInstance(seq.getObjectAt(0));
  if (seq.size() == 2)
  {
    pubLocation = GeneralName.getInstance(seq.getObjectAt(1));
  }
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

public ASN1Integer[][] getCertReqIds()
{
  ASN1Integer[][] result = new ASN1Integer[content.size()][];
  for (int i = 0; i != result.length; i++)
  {
    result[i] = sequenceToASN1IntegerArray((ASN1Sequence)content.getObjectAt(i));
  }
  return result;
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

public RevDetails[] toRevDetailsArray()
{
  RevDetails[] result = new RevDetails[content.size()];
  for (int i = 0; i != result.length; i++)
  {
    result[i] = RevDetails.getInstance(content.getObjectAt(i));
  }
  return result;
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

private EncryptedData(ASN1Sequence seq)
{
  this.version = ASN1Integer.getInstance(seq.getObjectAt(0));
  this.encryptedContentInfo = EncryptedContentInfo.getInstance(seq.getObjectAt(1));
  if (seq.size() == 3)
  {
    this.unprotectedAttrs = ASN1Set.getInstance((ASN1TaggedObject)seq.getObjectAt(2), false);
  }
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

public OtherCertID[] getCerts()
{
  OtherCertID[] cs = new OtherCertID[certs.size()];
  for (int i = 0; i != certs.size(); i++)
  {
    cs[i] = OtherCertID.getInstance(certs.getObjectAt(i));
  }
  return cs;
}

相关文章