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

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

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

ASN1ObjectIdentifier.toString介绍

暂无

代码示例

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

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

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

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

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

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

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

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

/**
 * return the object identifier for the content encryption algorithm.
 */
public String getEncryptionAlgOID()
{
  return encAlg.getAlgorithm().toString();
}

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

/**
 * return the object identifier for the content encryption algorithm.
 */
public String getEncryptionAlgOID()
{
  return encAlg.getAlgorithm().toString();
}

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

/**
 * Recupera el algoritmo de huella digital configurada para los empaquetados.
 * @return Algoritmo.
 */
public String getDigestAlgorithm() {
  return this.digestAlgorithm.getAlgorithm().toString();
}

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

/**
 * Add an attribute with multiple values to the certification request we are building.
 * Removed existing attributes with the same attrType.
 *
 * @param attrType  the OID giving the type of the attribute.
 * @param attrValue the ASN.1 structure that forms the value of the attribute.
 * @return this builder object.
 */
public PKCS10CertificationRequestBuilder setAttribute(ASN1ObjectIdentifier attrType, ASN1Encodable[] attrValue)
{
  // Remove existing copies of the attribute.
  for (Iterator it = attributes.iterator(); it.hasNext(); )
  {
    if (((Attribute)it.next()).getAttrType().equals(attrType))
    {
      throw new IllegalStateException("Attribute " + attrType.toString() + " is already set");
    }
  }
  addAttribute(attrType, attrValue);
  return this;
}

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

continue;
identifier = ident.toString();

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

/**
 * Set an attribute to the certification request we are building.
 * Removed existing attributes with the same attrType.
 *
 * @param attrType  the OID giving the type of the attribute.
 * @param attrValue the ASN.1 structure that forms the value of the attribute.
 * @return this builder object.
 */
public PKCS10CertificationRequestBuilder setAttribute(ASN1ObjectIdentifier attrType, ASN1Encodable attrValue)
{
  // Remove existing copies of the attribute.
  for (Iterator it = attributes.iterator(); it.hasNext(); )
  {
    if (((Attribute)it.next()).getAttrType().equals(attrType))
    {
      throw new IllegalStateException("Attribute " + attrType.toString() + " is already set");
    }
  }
  addAttribute(attrType, attrValue);
  return this;
}

代码示例来源:origin: es.gob.afirma/afirma-keystores-filters

private static List<String> getCertificatePolicyIds(final X509Certificate cert) {
   final byte[] certificatePoliciesBytes = cert.getExtensionValue("2.5.29.32"); //$NON-NLS-1$
   if (certificatePoliciesBytes == null || certificatePoliciesBytes.length < 1) {
     return new ArrayList<>(0);
   }
   final CertificatePolicies certificatePolicies = CertificatePolicies.getInstance(
     ASN1Sequence.getInstance(
       ASN1OctetString.getInstance(certificatePoliciesBytes).getOctets()
     )
   );
   final PolicyInformation[] pis = certificatePolicies.getPolicyInformation();
   final List<String> policyOids = new ArrayList<>(pis.length);
   for (final PolicyInformation pi : pis) {
     policyOids.add(pi.getPolicyIdentifier().toString());
   }
   return policyOids;
}

代码示例来源:origin: es.gob.afirma/afirma-crypto-cms-enveloper

if (algo.getOid().equals(algClave.getAlgorithm().toString())) {
  algorithm = algo;
  break;

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

final SignerInfo si = SignerInfo.getInstance(signerInfosSd.getObjectAt(i));
final AlgorithmIdentifier algHash = si.getDigestAlgorithm();
if (algHash.getAlgorithm().toString().equals(AOAlgorithmID.getOID(digestAlgorithm))) {
  final ASN1Set signedAttrib = si.getAuthenticatedAttributes();
  for (int s = 0; s < signedAttrib.size(); s++) {
    final ASN1Sequence elemento = (ASN1Sequence) signedAttrib.getObjectAt(s);
    final ASN1ObjectIdentifier oids = (ASN1ObjectIdentifier) elemento.getObjectAt(0);
    if (CMSAttributes.messageDigest.getId().equals(oids.toString())) {
      final DERSet derSetHash = (DERSet) elemento.getObjectAt(1);
      final DEROctetString derHash = (DEROctetString) derSetHash.getObjectAt(0);

代码示例来源:origin: es.gob.afirma/afirma-crypto-cms-enveloper

final String algoritmoOid = alg.getAlgorithm().toString();

代码示例来源:origin: es.gob.afirma/afirma-crypto-cms-enveloper

final AlgorithmIdentifier algHash = si.getDigestAlgorithm();
if (algHash.getAlgorithm().toString().equals(AOAlgorithmID.getOID(digestAlgorithm))) {
  final ASN1Set signedAttrib = si.getAuthenticatedAttributes();
  for (int s = 0; s < signedAttrib.size(); s++) {
    final ASN1Sequence elemento = (ASN1Sequence) signedAttrib.getObjectAt(s);
    final ASN1ObjectIdentifier oids = (ASN1ObjectIdentifier) elemento.getObjectAt(0);
    if (CMSAttributes.messageDigest.getId().toString().equals(oids.toString())) {
      final DERSet derSetHash = (DERSet) elemento.getObjectAt(1);
      final DEROctetString derHash = (DEROctetString) derSetHash.getObjectAt(0);

相关文章