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

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

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

ASN1Sequence.parser介绍

暂无

代码示例

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

public static SignedDataParser getInstance(
  Object o)
  throws IOException
{
  if (o instanceof ASN1Sequence)
  {
    return new SignedDataParser(((ASN1Sequence)o).parser());
  }
  if (o instanceof ASN1SequenceParser)
  {
    return new SignedDataParser((ASN1SequenceParser)o);
  }
  throw new IOException("unknown object encountered: " + o.getClass().getName());
}

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

public static SignedDataParser getInstance(
  Object o)
  throws IOException
{
  if (o instanceof ASN1Sequence)
  {
    return new SignedDataParser(((ASN1Sequence)o).parser());
  }
  if (o instanceof ASN1SequenceParser)
  {
    return new SignedDataParser((ASN1SequenceParser)o);
  }
  throw new IOException("unknown object encountered: " + o.getClass().getName());
}

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

public static TimeStampedDataParser getInstance(Object obj)
  throws IOException
{
  if (obj instanceof ASN1Sequence)
  {
    return new TimeStampedDataParser(((ASN1Sequence)obj).parser());
  }
  if (obj instanceof ASN1SequenceParser)
  {
    return new TimeStampedDataParser((ASN1SequenceParser)obj);
  }
  return null;
}

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

public static TimeStampedDataParser getInstance(Object obj)
  throws IOException
{
  if (obj instanceof ASN1Sequence)
  {
    return new TimeStampedDataParser(((ASN1Sequence)obj).parser());
  }
  if (obj instanceof ASN1SequenceParser)
  {
    return new TimeStampedDataParser((ASN1SequenceParser)obj);
  }
  return null;
}

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

public ASN1Encodable readObject() throws IOException
{
  if (index == max)
  {
    return null;
  }
  
  ASN1Encodable obj = getObjectAt(index++);
  if (obj instanceof ASN1Sequence)
  {
    return ((ASN1Sequence)obj).parser();
  }
  if (obj instanceof ASN1Set)
  {
    return ((ASN1Set)obj).parser();
  }
  return obj;
}

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

public ASN1Encodable readObject() throws IOException
{
  if (index == max)
  {
    return null;
  }
  
  ASN1Encodable obj = getObjectAt(index++);
  if (obj instanceof ASN1Sequence)
  {
    return ((ASN1Sequence)obj).parser();
  }
  if (obj instanceof ASN1Set)
  {
    return ((ASN1Set)obj).parser();
  }
  return obj;
}

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

public ASN1Encodable readObject() throws IOException
{
  if (index == max)
  {
    return null;
  }
  ASN1Encodable obj = getObjectAt(index++);
  if (obj instanceof ASN1Sequence)
  {
    return ((ASN1Sequence)obj).parser();
  }
  if (obj instanceof ASN1Set)
  {
    return ((ASN1Set)obj).parser();
  }
  return obj;
}

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

public ASN1Encodable readObject() throws IOException
{
  if (index == max)
  {
    return null;
  }
  ASN1Encodable obj = getObjectAt(index++);
  if (obj instanceof ASN1Sequence)
  {
    return ((ASN1Sequence)obj).parser();
  }
  if (obj instanceof ASN1Set)
  {
    return ((ASN1Set)obj).parser();
  }
  return obj;
}

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

/**
 * Return the object held in this tagged object as a parser assuming it has
 * the type of the passed in tag. If the object doesn't have a parser
 * associated with it, the base object is returned.
 */
public ASN1Encodable getObjectParser(
  int     tag,
  boolean isExplicit)
{
  switch (tag)
  {
  case BERTags.SET:
    return ASN1Set.getInstance(this, isExplicit).parser();
  case BERTags.SEQUENCE:
    return ASN1Sequence.getInstance(this, isExplicit).parser();
  case BERTags.OCTET_STRING:
    return ASN1OctetString.getInstance(this, isExplicit).parser();
  }
  if (isExplicit)
  {
    return getObject();
  }
  throw new RuntimeException("implicit tagging not implemented for tag: " + tag);
}

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

/**
 * Return the object held in this tagged object as a parser assuming it has
 * the type of the passed in tag. If the object doesn't have a parser
 * associated with it, the base object is returned.
 */
public ASN1Encodable getObjectParser(
  int     tag,
  boolean isExplicit)
  throws IOException
{
  switch (tag)
  {
  case BERTags.SET:
    return ASN1Set.getInstance(this, isExplicit).parser();
  case BERTags.SEQUENCE:
    return ASN1Sequence.getInstance(this, isExplicit).parser();
  case BERTags.OCTET_STRING:
    return ASN1OctetString.getInstance(this, isExplicit).parser();
  }
  if (isExplicit)
  {
    return getObject();
  }
  throw new ASN1Exception("implicit tagging not implemented for tag: " + tag);
}

代码示例来源:origin: AndroidHardening/Auditor

ASN1SequenceParser parser = ((ASN1Sequence) sequence).parser();
ASN1TaggedObject entry = parseAsn1TaggedObject(parser);
for (; entry != null; entry = parseAsn1TaggedObject(parser)) {

相关文章