gpt4 book ai didi

org.apache.harmony.security.x509.X509PublicKey类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 15:59:40 27 4
gpt4 key购买 nike

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

X509PublicKey介绍

暂无

代码示例

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

/**
 * Returns the PublicKey corresponding to this SubjectPublicKeyInfo
 * instance.
 */
public PublicKey getPublicKey() {
  if (publicKey == null) {
    final byte[] encoded = getEncoded();
    final KeySpec keySpec = new X509EncodedKeySpec(encoded);
    /* Try using the algorithm name first. */
    final String algName = algorithmID.getAlgorithmName();
    publicKey = generateKeyForAlgorithm(keySpec, algName);
    /*
     * Fall back to using the algorithm OID if it's not the same as the
     * algorithm name.
     */
    final String algOid = algorithmID.getAlgorithm();
    if (publicKey == null && !algOid.equals(algName)) {
      publicKey = generateKeyForAlgorithm(keySpec, algOid);
    }
    /*
     * Encode this as an X.509 public key since we didn't have any
     * KeyFactory that could handle this algorithm name or OID. Perhaps
     * the thing that's using this can decode it.
     */
    if (publicKey == null) {
      publicKey = new X509PublicKey(algOid, encoded, subjectPublicKey);
    }
  }
  return publicKey;
}

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

/**
 * Returns the PublicKey corresponding to this SubjectPublicKeyInfo
 * instance.
 */
public PublicKey getPublicKey() {
  if (publicKey == null) {
    final byte[] encoded = getEncoded();
    final KeySpec keySpec = new X509EncodedKeySpec(encoded);
    /* Try using the algorithm name first. */
    final String algName = algorithmID.getAlgorithmName();
    publicKey = generateKeyForAlgorithm(keySpec, algName);
    /*
     * Fall back to using the algorithm OID if it's not the same as the
     * algorithm name.
     */
    final String algOid = algorithmID.getAlgorithm();
    if (publicKey == null && !algOid.equals(algName)) {
      publicKey = generateKeyForAlgorithm(keySpec, algOid);
    }
    /*
     * Encode this as an X.509 public key since we didn't have any
     * KeyFactory that could handle this algorithm name or OID. Perhaps
     * the thing that's using this can decode it.
     */
    if (publicKey == null) {
      publicKey = new X509PublicKey(algOid, encoded, subjectPublicKey);
    }
  }
  return publicKey;
}

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

/**
 * Returns the PublicKey corresponding to this SubjectPublicKeyInfo
 * instance.
 */
public PublicKey getPublicKey() {
  if (publicKey == null) {
    final byte[] encoded = getEncoded();
    final KeySpec keySpec = new X509EncodedKeySpec(encoded);
    /* Try using the algorithm name first. */
    final String algName = algorithmID.getAlgorithmName();
    publicKey = generateKeyForAlgorithm(keySpec, algName);
    /*
     * Fall back to using the algorithm OID if it's not the same as the
     * algorithm name.
     */
    final String algOid = algorithmID.getAlgorithm();
    if (publicKey == null && !algOid.equals(algName)) {
      publicKey = generateKeyForAlgorithm(keySpec, algOid);
    }
    /*
     * Encode this as an X.509 public key since we didn't have any
     * KeyFactory that could handle this algorithm name or OID. Perhaps
     * the thing that's using this can decode it.
     */
    if (publicKey == null) {
      publicKey = new X509PublicKey(algOid, encoded, subjectPublicKey);
    }
  }
  return publicKey;
}

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

/**
 * Returns the PublicKey corresponding to this SubjectPublicKeyInfo
 * instance.
 */
public PublicKey getPublicKey() {
  if (publicKey == null) {
    final byte[] encoded = getEncoded();
    final KeySpec keySpec = new X509EncodedKeySpec(encoded);
    /* Try using the algorithm name first. */
    final String algName = algorithmID.getAlgorithmName();
    publicKey = generateKeyForAlgorithm(keySpec, algName);
    /*
     * Fall back to using the algorithm OID if it's not the same as the
     * algorithm name.
     */
    final String algOid = algorithmID.getAlgorithm();
    if (publicKey == null && !algOid.equals(algName)) {
      publicKey = generateKeyForAlgorithm(keySpec, algOid);
    }
    /*
     * Encode this as an X.509 public key since we didn't have any
     * KeyFactory that could handle this algorithm name or OID. Perhaps
     * the thing that's using this can decode it.
     */
    if (publicKey == null) {
      publicKey = new X509PublicKey(algOid, encoded, subjectPublicKey);
    }
  }
  return publicKey;
}

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

/**
 * Returns the PublicKey corresponding to this SubjectPublicKeyInfo
 * instance.
 */
public PublicKey getPublicKey() {
  if (publicKey == null) {
    final byte[] encoded = getEncoded();
    final KeySpec keySpec = new X509EncodedKeySpec(encoded);
    /* Try using the algorithm name first. */
    final String algName = algorithmID.getAlgorithmName();
    publicKey = generateKeyForAlgorithm(keySpec, algName);
    /*
     * Fall back to using the algorithm OID if it's not the same as the
     * algorithm name.
     */
    final String algOid = algorithmID.getAlgorithm();
    if (publicKey == null && !algOid.equals(algName)) {
      publicKey = generateKeyForAlgorithm(keySpec, algOid);
    }
    /*
     * Encode this as an X.509 public key since we didn't have any
     * KeyFactory that could handle this algorithm name or OID. Perhaps
     * the thing that's using this can decode it.
     */
    if (publicKey == null) {
      publicKey = new X509PublicKey(algOid, encoded, subjectPublicKey);
    }
  }
  return publicKey;
}

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

/**
 * Returns the PublicKey corresponding to this SubjectPublicKeyInfo
 * instance.
 */
public PublicKey getPublicKey() {
  if (publicKey == null) {
    final byte[] encoded = getEncoded();
    final KeySpec keySpec = new X509EncodedKeySpec(encoded);
    /* Try using the algorithm name first. */
    final String algName = algorithmID.getAlgorithmName();
    publicKey = generateKeyForAlgorithm(keySpec, algName);
    /*
     * Fall back to using the algorithm OID if it's not the same as the
     * algorithm name.
     */
    final String algOid = algorithmID.getAlgorithm();
    if (publicKey == null && !algOid.equals(algName)) {
      publicKey = generateKeyForAlgorithm(keySpec, algOid);
    }
    /*
     * Encode this as an X.509 public key since we didn't have any
     * KeyFactory that could handle this algorithm name or OID. Perhaps
     * the thing that's using this can decode it.
     */
    if (publicKey == null) {
      publicKey = new X509PublicKey(algOid, encoded, subjectPublicKey);
    }
  }
  return publicKey;
}

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

/**
 * Returns the PublicKey corresponding to this SubjectPublicKeyInfo
 * instance.
 */
public PublicKey getPublicKey() {
  if (publicKey == null) {
    final byte[] encoded = getEncoded();
    final KeySpec keySpec = new X509EncodedKeySpec(encoded);
    /* Try using the algorithm name first. */
    final String algName = algorithmID.getAlgorithmName();
    publicKey = generateKeyForAlgorithm(keySpec, algName);
    /*
     * Fall back to using the algorithm OID if it's not the same as the
     * algorithm name.
     */
    final String algOid = algorithmID.getAlgorithm();
    if (publicKey == null && !algOid.equals(algName)) {
      publicKey = generateKeyForAlgorithm(keySpec, algOid);
    }
    /*
     * Encode this as an X.509 public key since we didn't have any
     * KeyFactory that could handle this algorithm name or OID. Perhaps
     * the thing that's using this can decode it.
     */
    if (publicKey == null) {
      publicKey = new X509PublicKey(algOid, encoded, subjectPublicKey);
    }
  }
  return publicKey;
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com