java.security.cert.X509CRLEntry.getEncoded()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(97)

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

X509CRLEntry.getEncoded介绍

[英]Returns this entry in ASN.1 DER encoded form.
[中]在ASN中返回此条目。1.编码形式。

代码示例

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

/**
 * Returns the hashcode of this instance.
 *
 * @return the hashcode of this instance.
 */
public int hashCode() {
  int res = 0;
  try {
    byte[] array = getEncoded();
    for (int i=0; i<array.length; i++) {
      res += array[i] & 0xFF;
    }
  } catch (CRLException e) {
  }
  return res;
}

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

/**
 * Returns whether the specified object equals to this instance.
 *
 * @param other
 *            the object to compare.
 * @return {@code true} if the specified object equals to this instance,
 *         otherwise {@code false}.
 */
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (!(other instanceof X509CRLEntry)) {
    return false;
  }
  X509CRLEntry obj = (X509CRLEntry) other;
  try {
    return Arrays.equals(getEncoded(), obj.getEncoded());
  } catch (CRLException e) {
    return false;
  }
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns the hashcode of this instance.
 *
 * @return the hashcode of this instance.
 */
public int hashCode() {
  int res = 0;
  try {
    byte[] array = getEncoded();
    for (int i=0; i<array.length; i++) {
      res += array[i] & 0xFF;
    }
  } catch (CRLException e) {
  }
  return res;
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns the hashcode of this instance.
 *
 * @return the hashcode of this instance.
 */
public int hashCode() {
  int res = 0;
  try {
    byte[] array = getEncoded();
    for (int i=0; i<array.length; i++) {
      res += array[i] & 0xFF;
    }
  } catch (CRLException e) {
  }
  return res;
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Returns the hashcode of this instance.
 *
 * @return the hashcode of this instance.
 */
public int hashCode() {
  int res = 0;
  try {
    byte[] array = getEncoded();
    for (int i=0; i<array.length; i++) {
      res += array[i] & 0xFF;
    }
  } catch (CRLException e) {
  }
  return res;
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Returns the hashcode of this instance.
 *
 * @return the hashcode of this instance.
 */
public int hashCode() {
  int res = 0;
  try {
    byte[] array = getEncoded();
    for (int i=0; i<array.length; i++) {
      res += array[i] & 0xFF;
    }
  } catch (CRLException e) {
  }
  return res;
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns the hashcode of this instance.
 *
 * @return the hashcode of this instance.
 */
public int hashCode() {
  int res = 0;
  try {
    byte[] array = getEncoded();
    for (int i=0; i<array.length; i++) {
      res += array[i] & 0xFF;
    }
  } catch (CRLException e) {
  }
  return res;
}

代码示例来源:origin: ibinti/bugvm

/**
 * Returns the hashcode of this instance.
 *
 * @return the hashcode of this instance.
 */
public int hashCode() {
  int res = 0;
  try {
    byte[] array = getEncoded();
    for (int i=0; i<array.length; i++) {
      res += array[i] & 0xFF;
    }
  } catch (CRLException e) {
  }
  return res;
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Returns whether the specified object equals to this instance.
 *
 * @param other
 *            the object to compare.
 * @return {@code true} if the specified object equals to this instance,
 *         otherwise {@code false}.
 */
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (!(other instanceof X509CRLEntry)) {
    return false;
  }
  X509CRLEntry obj = (X509CRLEntry) other;
  try {
    return Arrays.equals(getEncoded(), obj.getEncoded());
  } catch (CRLException e) {
    return false;
  }
}

代码示例来源:origin: ibinti/bugvm

/**
 * Returns whether the specified object equals to this instance.
 *
 * @param other
 *            the object to compare.
 * @return {@code true} if the specified object equals to this instance,
 *         otherwise {@code false}.
 */
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (!(other instanceof X509CRLEntry)) {
    return false;
  }
  X509CRLEntry obj = (X509CRLEntry) other;
  try {
    return Arrays.equals(getEncoded(), obj.getEncoded());
  } catch (CRLException e) {
    return false;
  }
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns whether the specified object equals to this instance.
 *
 * @param other
 *            the object to compare.
 * @return {@code true} if the specified object equals to this instance,
 *         otherwise {@code false}.
 */
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (!(other instanceof X509CRLEntry)) {
    return false;
  }
  X509CRLEntry obj = (X509CRLEntry) other;
  try {
    return Arrays.equals(getEncoded(), obj.getEncoded());
  } catch (CRLException e) {
    return false;
  }
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns whether the specified object equals to this instance.
 *
 * @param other
 *            the object to compare.
 * @return {@code true} if the specified object equals to this instance,
 *         otherwise {@code false}.
 */
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (!(other instanceof X509CRLEntry)) {
    return false;
  }
  X509CRLEntry obj = (X509CRLEntry) other;
  try {
    return Arrays.equals(getEncoded(), obj.getEncoded());
  } catch (CRLException e) {
    return false;
  }
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns whether the specified object equals to this instance.
 *
 * @param other
 *            the object to compare.
 * @return {@code true} if the specified object equals to this instance,
 *         otherwise {@code false}.
 */
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (!(other instanceof X509CRLEntry)) {
    return false;
  }
  X509CRLEntry obj = (X509CRLEntry) other;
  try {
    return Arrays.equals(getEncoded(), obj.getEncoded());
  } catch (CRLException e) {
    return false;
  }
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Returns whether the specified object equals to this instance.
 *
 * @param other
 *            the object to compare.
 * @return {@code true} if the specified object equals to this instance,
 *         otherwise {@code false}.
 */
public boolean equals(Object other) {
  if (other == this) {
    return true;
  }
  if (!(other instanceof X509CRLEntry)) {
    return false;
  }
  X509CRLEntry obj = (X509CRLEntry) other;
  try {
    return Arrays.equals(getEncoded(), obj.getEncoded());
  } catch (CRLException e) {
    return false;
  }
}

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

/**
 * Add the CRLEntry objects contained in a previous CRL.
 * 
 * @param other the X509CRL to source the other entries from. 
 */
public void addCRL(X509CRL other)
  throws CRLException
{
  Set revocations = other.getRevokedCertificates();
  if (revocations != null)
  {
    Iterator it = revocations.iterator();
    while (it.hasNext())
    {
      X509CRLEntry entry = (X509CRLEntry)it.next();
      ASN1InputStream aIn = new ASN1InputStream(entry.getEncoded());
      try
      {
        tbsGen.addCRLEntry(ASN1Sequence.getInstance(aIn.readObject()));
      }
      catch (IOException e)
      {
        throw new CRLException("exception processing encoding of CRL: " + e.toString());
      }
    }
  }
}

代码示例来源:origin: ripple-unmaintained/ripple-lib-java

/**
 * Add the CRLEntry objects contained in a previous CRL.
 * 
 * @param other the X509CRL to source the other entries from. 
 */
public void addCRL(X509CRL other)
  throws CRLException
{
  Set revocations = other.getRevokedCertificates();
  if (revocations != null)
  {
    Iterator it = revocations.iterator();
    while (it.hasNext())
    {
      X509CRLEntry entry = (X509CRLEntry)it.next();
      ASN1InputStream aIn = new ASN1InputStream(entry.getEncoded());
      try
      {
        tbsGen.addCRLEntry(ASN1Sequence.getInstance(aIn.readObject()));
      }
      catch (IOException e)
      {
        throw new CRLException("exception processing encoding of CRL: " + e.toString());
      }
    }
  }
}

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

/**
 * Add the CRLEntry objects contained in a previous CRL.
 * 
 * @param other the X509CRL to source the other entries from. 
 */
public void addCRL(X509CRL other)
  throws CRLException
{
  Set revocations = other.getRevokedCertificates();
  if (revocations != null)
  {
    Iterator it = revocations.iterator();
    while (it.hasNext())
    {
      X509CRLEntry entry = (X509CRLEntry)it.next();
      ASN1InputStream aIn = new ASN1InputStream(entry.getEncoded());
      try
      {
        tbsGen.addCRLEntry(ASN1Sequence.getInstance(aIn.readObject()));
      }
      catch (IOException e)
      {
        throw new CRLException("exception processing encoding of CRL: " + e.toString());
      }
    }
  }
}

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

/**
 * Add the CRLEntry objects contained in a previous CRL.
 * 
 * @param other the X509CRL to source the other entries from. 
 */
public void addCRL(X509CRL other)
  throws CRLException
{
  Set revocations = other.getRevokedCertificates();
  if (revocations != null)
  {
    Iterator it = revocations.iterator();
    while (it.hasNext())
    {
      X509CRLEntry entry = (X509CRLEntry)it.next();
      ASN1InputStream aIn = new ASN1InputStream(entry.getEncoded());
      try
      {
        tbsGen.addCRLEntry(ASN1Sequence.getInstance(aIn.readObject()));
      }
      catch (IOException e)
      {
        throw new CRLException("exception processing encoding of CRL: " + e.toString());
      }
    }
  }
}

相关文章