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

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

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

ASN1OctetString.getEncoded介绍

暂无

代码示例

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

public byte[] getExtensionValue(String oid)
{
  Extension ext = getExtension(new ASN1ObjectIdentifier(oid));
  if (ext != null)
  {
    try
    {
      return ext.getExtnValue().getEncoded();
    }
    catch (Exception e)
    {
      throw new RuntimeException("error encoding " + e.toString());
    }
  }
  return null;
}

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

public byte[] getExtensionValue(String oid)
{
  Extension ext = getExtension(new ASN1ObjectIdentifier(oid));
  if (ext != null)
  {
    try
    {
      return ext.getExtnValue().getEncoded();
    }
    catch (Exception e)
    {
      throw new IllegalStateException("Exception encoding: " + e.toString());
    }
  }
  return null;
}

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

public byte[] getExtensionValue(String oid)
  {
    X509Extensions exts = this.getSingleRequestExtensions();

    if (exts != null)
    {
      X509Extension   ext = exts.getExtension(new DERObjectIdentifier(oid));

      if (ext != null)
      {
        try
        {
          return ext.getValue().getEncoded(ASN1Encoding.DER);
        }
        catch (Exception e)
        {
          throw new RuntimeException("error encoding " + e.toString());
        }
      }
    }

    return null;
  }
}

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

public byte[] getExtensionValue(String oid)
  {
    X509Extensions exts = this.getRequestExtensions();

    if (exts != null)
    {
      X509Extension   ext = exts.getExtension(new ASN1ObjectIdentifier(oid));

      if (ext != null)
      {
        try
        {
          return ext.getValue().getEncoded(ASN1Encoding.DER);
        }
        catch (Exception e)
        {
          throw new RuntimeException("error encoding " + e.toString());
        }
      }
    }

    return null;
  }
}

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

public byte[] getExtensionValue(String oid)
  {
    X509Extensions exts = this.getSingleExtensions();

    if (exts != null)
    {
      X509Extension   ext = exts.getExtension(new DERObjectIdentifier(oid));

      if (ext != null)
      {
        try
        {
          return ext.getValue().getEncoded(ASN1Encoding.DER);
        }
        catch (Exception e)
        {
          throw new RuntimeException("error encoding " + e.toString());
        }
      }
    }

    return null;
  }
}

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

public byte[] getExtensionValue(String oid)
{
  Extensions exts = c.getExtensions();
  if (exts != null)
  {
    Extension ext = exts.getExtension(new ASN1ObjectIdentifier(oid));
    if (ext != null)
    {
      try
      {
        return ext.getExtnValue().getEncoded();
      }
      catch (Exception e)
      {
        throw new RuntimeException("error encoding " + e.toString());
      }
    }
  }
  return null;
}

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

public byte[] getExtensionValue(String oid)
{
  X509Extensions exts = this.getResponseExtensions();
  if (exts != null)
  {
    X509Extension   ext = exts.getExtension(new DERObjectIdentifier(oid));
    if (ext != null)
    {
      try
      {
        return ext.getValue().getEncoded(ASN1Encoding.DER);
      }
      catch (Exception e)
      {
        throw new RuntimeException("error encoding " + e.toString());
      }
    }
  }
  return null;
}

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

public byte[] getExtensionValue(String oid)
  {
    X509Extensions exts = this.getResponseExtensions();

    if (exts != null)
    {
      X509Extension   ext = exts.getExtension(new DERObjectIdentifier(oid));

      if (ext != null)
      {
        try
        {
          return ext.getValue().getEncoded(ASN1Encoding.DER);
        }
        catch (Exception e)
        {
          throw new RuntimeException("error encoding " + e.toString());
        }
      }
    }

    return null;
  }
}

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

public byte[] getExtensionValue(String oid)
{
  Extensions exts = c.getTBSCertList().getExtensions();
  if (exts != null)
  {
    Extension ext = exts.getExtension(new ASN1ObjectIdentifier(oid));
    if (ext != null)
    {
      try
      {
        return ext.getExtnValue().getEncoded();
      }
      catch (Exception e)
      {
        throw new IllegalStateException("error parsing " + e.toString());
      }
    }
  }
  return null;
}

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

public byte[] getExtensionValue(String oid)
{
  Extensions exts = c.getTBSCertList().getExtensions();
  if (exts != null)
  {
    Extension ext = exts.getExtension(new ASN1ObjectIdentifier(oid));
    if (ext != null)
    {
      try
      {
        return ext.getExtnValue().getEncoded();
      }
      catch (Exception e)
      {
        throw new IllegalStateException("error parsing " + e.toString());
      }
    }
  }
  return null;
}

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

public byte[] getExtensionValue(String oid) 
{
  Extensions extensions = cert.getAcinfo().getExtensions();
  if (extensions != null)
  {
    Extension ext = extensions.getExtension(new ASN1ObjectIdentifier(oid));
    if (ext != null)
    {
      try
      {
        return ext.getExtnValue().getEncoded(ASN1Encoding.DER);
      }
      catch (Exception e)
      {
        throw new RuntimeException("error encoding " + e.toString());
      }
    }
  }
  return null;
}

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

public byte[] getExtensionValue(String oid) 
{
  Extensions exts = c.getTBSCertificate().getExtensions();
  if (exts != null)
  {
    Extension   ext = exts.getExtension(new ASN1ObjectIdentifier(oid));
    if (ext != null)
    {
      try
      {
        return ext.getExtnValue().getEncoded();
      }
      catch (Exception e)
      {
        throw new IllegalStateException("error parsing " + e.toString());
      }
    }
  }
  return null;
}

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

public byte[] getExtensionValue(String oid) 
{
  Extensions exts = c.getTBSCertificate().getExtensions();
  if (exts != null)
  {
    Extension   ext = exts.getExtension(new ASN1ObjectIdentifier(oid));
    if (ext != null)
    {
      try
      {
        return ext.getExtnValue().getEncoded();
      }
      catch (Exception e)
      {
        throw new IllegalStateException("error parsing " + e.toString());
      }
    }
  }
  return null;
}

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

public byte[] getExtensionValue(String oid)
{
  Extensions exts = c.getTBSCertList().getExtensions();
  if (exts != null)
  {
    Extension ext = exts.getExtension(new ASN1ObjectIdentifier(oid));
    if (ext != null)
    {
      try
      {
        return ext.getExtnValue().getEncoded();
      }
      catch (Exception e)
      {
        throw new IllegalStateException("error parsing " + e.toString());
      }
    }
  }
  return null;
}

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

public byte[] getExtensionValue(String oid) 
{
  Extensions extensions = cert.getAcinfo().getExtensions();
  if (extensions != null)
  {
    Extension ext = extensions.getExtension(new ASN1ObjectIdentifier(oid));
    if (ext != null)
    {
      try
      {
        return ext.getExtnValue().getEncoded(ASN1Encoding.DER);
      }
      catch (Exception e)
      {
        throw new RuntimeException("error encoding " + e.toString());
      }
    }
  }
  return null;
}

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

public byte[] getExtensionValue(String oid) 
{
  X509Extensions exts = c.getTBSCertificate().getExtensions();
  if (exts != null)
  {
    X509Extension   ext = exts.getExtension(new DERObjectIdentifier(oid));
    if (ext != null)
    {
      try
      {
        return ext.getValue().getEncoded();
      }
      catch (Exception e)
      {
        throw new IllegalStateException("error parsing " + e.toString());
      }
    }
  }
  return null;
}

相关文章