org.spongycastle.asn1.ASN1ObjectIdentifier类的使用及代码示例

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

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

ASN1ObjectIdentifier介绍

[英]Class representing the ASN.1 OBJECT IDENTIFIER type.
[中]表示ASN的类。1对象标识符类型。

代码示例

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

public static boolean isDsaOid(
  ASN1ObjectIdentifier algOid)
{
  for (int i = 0; i != dsaOids.length; i++)
  {
    if (algOid.equals(dsaOids[i]))
    {
      return true;
    }
  }
  return false;
}

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

public CMSProcessableByteArray(
  byte[]  bytes)
{
  this(new ASN1ObjectIdentifier(CMSObjectIdentifiers.data.getId()), bytes);
}

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

public static KeyPurposeId getInstance(Object o)
{
  if (o instanceof KeyPurposeId)
  {
    return (KeyPurposeId)o;
  }
  else if (o != null)
  {
    return new KeyPurposeId(ASN1ObjectIdentifier.getInstance(o));
  }
  return null;
}

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

public String toString()
  {
    return ("AccessDescription: Oid(" + this.accessMethod.getId() + ")");
  }
}

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

private void initialize(ContentInfo contentInfo)
{
  this.contentInfo = contentInfo;
  if (CMSObjectIdentifiers.timestampedData.equals(contentInfo.getContentType()))
  {
    this.timeStampedData = TimeStampedData.getInstance(contentInfo.getContent());
  }
  else
  {
    throw new IllegalArgumentException("Malformed content - type must be " + CMSObjectIdentifiers.timestampedData.getId());
  }
  util = new TimeStampDataUtil(this.timeStampedData);
}

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

/**
 * Return an OID that creates a branch under the current one.
 *
 * @param branchID node numbers for the new branch.
 * @return the OID for the new created branch.
 */
public ASN1ObjectIdentifier branch(String branchID)
{
  return new ASN1ObjectIdentifier(this, branchID);
}

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

public String toString()
  {
    return id.toString();
  }
}

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

private boolean isPKCS12(ASN1ObjectIdentifier algorithm)
{
  return algorithm.on(PKCSObjectIdentifiers.pkcs_12PbeIds)
    || algorithm.on(BCObjectIdentifiers.bc_pbe_sha1_pkcs12)
    || algorithm.on(BCObjectIdentifiers.bc_pbe_sha256_pkcs12);
}

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

public String getAlgorithmName(ASN1ObjectIdentifier objectIdentifier)
{
  String name = (String)algorithms.get(objectIdentifier);
  return (name != null) ? name : objectIdentifier.getId();
}

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

private void initialize(ContentInfo contentInfo)
{
  this.contentInfo = contentInfo;
  if (CMSObjectIdentifiers.timestampedData.equals(contentInfo.getContentType()))
  {
    this.timeStampedData = TimeStampedData.getInstance(contentInfo.getContent());
  }
  else
  {
    throw new IllegalArgumentException("Malformed content - type must be " + CMSObjectIdentifiers.timestampedData.getId());
  }
  util = new TimeStampDataUtil(this.timeStampedData);
}

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

public AttributeTypeAndValue(
  String oid,
  ASN1Encodable value)
{
  this(new ASN1ObjectIdentifier(oid), value);
}

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

/**
 * return the object identifier for the mac algorithm.
 */
public String getMacAlgOID()
{
  return macAlg.getAlgorithm().toString();
}

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

private boolean isPKCS12(ASN1ObjectIdentifier algorithm)
{
  return algorithm.on(PKCSObjectIdentifiers.pkcs_12PbeIds)
    || algorithm.on(BCObjectIdentifiers.bc_pbe_sha1_pkcs12)
    || algorithm.on(BCObjectIdentifiers.bc_pbe_sha256_pkcs12);
}

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

public static boolean isDsaOid(
  ASN1ObjectIdentifier algOid)
{
  for (int i = 0; i != dsaOids.length; i++)
  {
    if (algOid.equals(dsaOids[i]))
    {
      return true;
    }
  }
  return false;
}

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

public CMSProcessableFile(
  File file,
  int  bufSize)
{
  this(new ASN1ObjectIdentifier(CMSObjectIdentifiers.data.getId()), file, bufSize);
}

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

String getKeyAlgorithmName(ASN1ObjectIdentifier oid)
  {

    String name = (String)symmetricKeyAlgNames.get(oid);

    if (name != null)
    {
      return name;
    }

    return oid.getId();
  }
}

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

static String getSignatureName(
  AlgorithmIdentifier sigAlgId)
{
  ASN1Encodable params = sigAlgId.getParameters();
  if (params != null && !DERNull.INSTANCE.equals(params))
  {
    if (sigAlgId.getAlgorithm().equals(PKCSObjectIdentifiers.id_RSASSA_PSS))
    {
      RSASSAPSSparams rsaParams = RSASSAPSSparams.getInstance(params);
      return getDigestAlgName(rsaParams.getHashAlgorithm().getAlgorithm()) + "withRSAandMGF1";
    }
  }
  return sigAlgId.getAlgorithm().getId();
}

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

public AttributeTypeAndValue(
  String oid,
  ASN1Encodable value)
{
  this(new ASN1ObjectIdentifier(oid), value);
}

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

public static CertPolicyId getInstance(Object o)
{
  if (o instanceof CertPolicyId)
  {
    return (CertPolicyId)o;
  }
  else if (o != null)
  {
    return new CertPolicyId(ASN1ObjectIdentifier.getInstance(o));
  }
  return null;
}

代码示例来源:origin: es.gob.afirma/afirma-crypto-core-pkcs7

/**
 * Recupera el tipo de contenido.
 * @return Tipo de contenido.
 */
public String getContentType() {
  return this.contentInfo.getContentType().toString();
}

相关文章