org.spongycastle.asn1.ASN1ObjectIdentifier.fromOctetString()方法的使用及代码示例

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

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

ASN1ObjectIdentifier.fromOctetString介绍

暂无

代码示例

代码示例来源:origin: com.madgag.spongycastle/core

/**
 * Return an OBJECT IDENTIFIER from a tagged object.
 *
 * @param obj      the tagged object holding the object we want
 * @param explicit true if the object is meant to be explicitly
 *                 tagged false otherwise.
 * @return an ASN1ObjectIdentifier instance, or null.
 * @throws IllegalArgumentException if the tagged object cannot
 * be converted.
 */
public static ASN1ObjectIdentifier getInstance(
  ASN1TaggedObject obj,
  boolean explicit)
{
  ASN1Primitive o = obj.getObject();
  if (explicit || o instanceof ASN1ObjectIdentifier)
  {
    return getInstance(o);
  }
  else
  {
    return ASN1ObjectIdentifier.fromOctetString(ASN1OctetString.getInstance(obj.getObject()).getOctets());
  }
}

代码示例来源:origin: com.madgag/sc-light-jdk15on

/**
 * return an Object Identifier from a tagged object.
 *
 * @param obj the tagged object holding the object we want
 * @param explicit true if the object is meant to be explicitly
 *              tagged false otherwise.
 * @exception IllegalArgumentException if the tagged object cannot
 *               be converted.
 */
public static ASN1ObjectIdentifier getInstance(
  ASN1TaggedObject obj,
  boolean          explicit)
{
  ASN1Primitive o = obj.getObject();
  if (explicit || o instanceof DERObjectIdentifier)
  {
    return getInstance(o);
  }
  else
  {
    return ASN1ObjectIdentifier.fromOctetString(ASN1OctetString.getInstance(obj.getObject()).getOctets());
  }
}

代码示例来源:origin: com.madgag/sc-light-jdk15on

return new DERNumericString(defIn.toByteArray());
case OBJECT_IDENTIFIER:
  return ASN1ObjectIdentifier.fromOctetString(getBuffer(defIn, tmpBuffers));
case OCTET_STRING:
  return new DEROctetString(defIn.toByteArray());

代码示例来源:origin: com.madgag.spongycastle/core

return new DERNumericString(defIn.toByteArray());
case OBJECT_IDENTIFIER:
  return ASN1ObjectIdentifier.fromOctetString(getBuffer(defIn, tmpBuffers));
case OCTET_STRING:
  return new DEROctetString(defIn.toByteArray());

相关文章