org.bouncycastle.asn1.x509.AlgorithmIdentifier.equals()方法的使用及代码示例

x33g5p2x  于11个月前 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(38)

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

AlgorithmIdentifier.equals介绍

暂无

代码示例

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

/**
 * Return true if this spec is for the default PRF (HmacSHA1), false otherwise.
 *
 * @return true if this spec uses the default PRF, false otherwise.
 */
public boolean isDefaultPrf()
{
  return defaultPRF.equals(prf);
}

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

/**
 * Return true if the PRF is the default (hmacWithSHA1)
 *
 * @return true if PRF is default, false otherwise.
 */
public boolean isDefaultPrf()
{
  return prf == null || prf.equals(algid_hmacWithSHA1);
}

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

/**
 * Return true if the PRF is the default (hmacWithSHA1)
 *
 * @return true if PRF is default, false otherwise.
 */
public boolean isDefaultPrf()
{
  return prf == null || prf.equals(algid_hmacWithSHA1);
}

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

private void writeObject(
    ObjectOutputStream out)
    throws IOException
  {
    out.defaultWriteObject();

    if (!algorithmIdentifier.equals(DEFAULT_ALGORITHM_IDENTIFIER))
    {
      out.writeObject(algorithmIdentifier.getEncoded());
    }
  }
}

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

private void doVerify(PublicKey key, Signature sig)
  throws CRLException, NoSuchAlgorithmException,
  InvalidKeyException, SignatureException
{
  if (!c.getSignatureAlgorithm().equals(c.getTBSCertList().getSignature()))
  {
    throw new CRLException("Signature algorithm on CertificateList does not match TBSCertList.");
  }
  sig.initVerify(key);
  sig.update(this.getTBSCertList());
  if (!sig.verify(this.getSignature()))
  {
    throw new SignatureException("CRL does not verify with supplied public key.");
  }
}

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

if (!hashAlgorithm.equals(DEFAULT_HASH_ALGORITHM))
if (!maskGenAlgorithm.equals(DEFAULT_MASK_GEN_FUNCTION))
if (!pSourceAlgorithm.equals(DEFAULT_P_SOURCE_ALGORITHM))

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

if (!hashAlgorithm.equals(DEFAULT_HASH_ALGORITHM))
if (!maskGenAlgorithm.equals(DEFAULT_MASK_GEN_FUNCTION))
if (!pSourceAlgorithm.equals(DEFAULT_P_SOURCE_ALGORITHM))

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

public final void verify(
    PublicKey   key,
    String      provider)
    throws CertificateException, NoSuchAlgorithmException,
    InvalidKeyException, NoSuchProviderException, SignatureException
{
  Signature   signature = null;
  if (!cert.getSignatureAlgorithm().equals(cert.getAcinfo().getSignature()))
  {
    throw new CertificateException("Signature algorithm in certificate info not same as outer certificate");
  }
  signature = Signature.getInstance(cert.getSignatureAlgorithm().getAlgorithm().getId(), provider);
  signature.initVerify(key);
  try
  {
    signature.update(cert.getAcinfo().getEncoded());
  }
  catch (IOException e)
  {
    throw new SignatureException("Exception encoding certificate info object");
  }
  if (!signature.verify(this.getSignature()))
  {
    throw new InvalidKeyException("Public key presented not for certificate signature");
  }
}

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

private void doVerify(PublicKey key, Signature sig)
  throws CRLException, NoSuchAlgorithmException,
  InvalidKeyException, SignatureException
{
  if (!c.getSignatureAlgorithm().equals(c.getTBSCertList().getSignature()))
  {
    throw new CRLException("Signature algorithm on CertificateList does not match TBSCertList.");
  }
  if (sigAlgParams != null)
  {
    try
    {
      // needs to be called before initVerify().
      X509SignatureUtil.setSignatureParameters(sig, ASN1Primitive.fromByteArray(sigAlgParams));
    }
    catch (IOException e)
    {
      throw new SignatureException("cannot decode signature parameters: " + e.getMessage());
    }
  }
  sig.initVerify(key);
  sig.update(this.getTBSCertList());
  if (!sig.verify(this.getSignature()))
  {
    throw new SignatureException("CRL does not verify with supplied public key.");
  }
}

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

vector.add(algorithmIdentifier);
if (algorithmIdentifier.equals(algId))

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

/**
   * Return an ASN.1 structure suitable for encoding.
   *
   * @return the object as an ASN.1 encodable structure.
   */
  public ASN1Primitive toASN1Primitive()
  {
    ASN1EncodableVector  v = new ASN1EncodableVector();

    v.add(octStr);
    v.add(iterationCount);

    if (keyLength != null)
    {
      v.add(keyLength);
    }

    if (prf != null && !prf.equals(algid_hmacWithSHA1))
    {
      v.add(prf);
    }

    return new DERSequence(v);
  }
}

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

/**
   * Return an ASN.1 structure suitable for encoding.
   *
   * @return the object as an ASN.1 encodable structure.
   */
  public ASN1Primitive toASN1Primitive()
  {
    ASN1EncodableVector v = new ASN1EncodableVector();

    v.add(octStr);
    v.add(iterationCount);

    if (keyLength != null)
    {
      v.add(keyLength);
    }

    if (prf != null && !prf.equals(algid_hmacWithSHA1))
    {
      v.add(prf);
    }

    return new DERSequence(v);
  }
}

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

if (!hashAlgorithm.equals(DEFAULT_ALG_ID))

代码示例来源:origin: org.xipki.pki/ca-qa

if (!tbsSigAlgId.equals(sigAlgId)) {
  issue.setFailureMessage(
      "Certificate.tbsCertificate.signature != Certificate.signatureAlgorithm");
    if (!expSigAlgId.equals(sigAlgId)) {
      issue.setFailureMessage("invalid parameters");

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

if (!hashAlgorithm.equals(DEFAULT_ALG_ID))

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

if (!hashAlgorithm.equals(DEFAULT_HASH_ALGORITHM))
if (!maskGenAlgorithm.equals(DEFAULT_MASK_GEN_FUNCTION))

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

if (!hashAlgorithm.equals(DEFAULT_HASH_ALGORITHM))
if (!maskGenAlgorithm.equals(DEFAULT_MASK_GEN_FUNCTION))

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

if (!storeData.getIntegrityAlgorithm().equals(integrityAlg))

代码示例来源:origin: xipki/xipki

if (!params.getPSourceAlgorithm().equals(RSAESOAEPparams.DEFAULT_P_SOURCE_ALGORITHM)) {
 throw new Exception(
   "unsupported RSAESOAEPparams.PSourceAlgorithm " + oid.getId());

代码示例来源:origin: org.xipki/cmpclient

if (!params.getPSourceAlgorithm().equals(RSAESOAEPparams.DEFAULT_P_SOURCE_ALGORITHM)) {
 throw new XiSecurityException(
   "unsupported RSAESOAEPparams.PSourceAlgorithm " + oid.getId());

相关文章