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

x33g5p2x  于2022-01-16 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(91)

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

ASN1Set.parser介绍

暂无

代码示例

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

public ASN1SetParser getDigestAlgorithms()
  throws IOException
{
  Object o = _seq.readObject();
  if (o instanceof ASN1Set)
  {
    return ((ASN1Set)o).parser();
  }
  return (ASN1SetParser)o;
}

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

public ASN1SetParser getDigestAlgorithms()
  throws IOException
{
  Object o = _seq.readObject();
  if (o instanceof ASN1Set)
  {
    return ((ASN1Set)o).parser();
  }
  return (ASN1SetParser)o;
}

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

相关文章