Most visited

Recently visited

Added in API level 1

KeyStore.PrivateKeyEntry

public static final class KeyStore.PrivateKeyEntry
extends Object implements KeyStore.Entry

java.lang.Object
    java.security.KeyStore.PrivateKeyEntry


包含 PrivateKey和相应证书链的 KeyStore条目。

摘要(Summary)

Public constructors

KeyStore.PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain)

PrivateKey和相应的证书链构造一个 PrivateKeyEntry

公共方法(Public methods)

Certificate getCertificate()

Certificate从证书链获取最终实体 Certificate

Certificate[] getCertificateChain()

从此条目获取 Certificate链。

PrivateKey getPrivateKey()

从此条目获取 PrivateKey

String toString()

返回此PrivateKeyEntry的字符串表示形式。

继承方法(Inherited methods)

From class java.lang.Object

Public constructors

KeyStore.PrivateKeyEntry

Added in API level 1
KeyStore.PrivateKeyEntry (PrivateKey privateKey, 
                Certificate[] chain)

使用 PrivateKey和相应的证书链构造 PrivateKeyEntry

指定的 chain在存储在新的 PrivateKeyEntry对象中之前被克隆。

参数(Parameters)
privateKey PrivateKey: the PrivateKey
chain Certificate: an array of Certificates representing the certificate chain. The chain must be ordered and contain a Certificate at index 0 corresponding to the private key.
抛出异常(Throws)
NullPointerException if privateKey or chain is null
IllegalArgumentException if the specified chain has a length of 0, if the specified chain does not contain Certificates of the same type, or if the PrivateKey algorithm does not match the algorithm of the PublicKey in the end entity Certificate (at index 0)

公共方法(Public methods)

getCertificate

Added in API level 1
Certificate getCertificate ()

Certificate从证书链获取最终实体 Certificate

返回(Returns)
Certificate the end entity Certificate (at index 0) from the certificate chain in this entry. If the certificate is of type X.509, the runtime type of the returned certificate is X509Certificate.

getCertificateChain

Added in API level 1
Certificate[] getCertificateChain ()

从此条目获取 Certificate链。

存储的链在返回之前被克隆。

返回(Returns)
Certificate[] an array of Certificates corresponding to the certificate chain for the public key. If the certificates are of type X.509, the runtime type of the returned array is X509Certificate[].

getPrivateKey

Added in API level 1
PrivateKey getPrivateKey ()

从此条目获取 PrivateKey

返回(Returns)
PrivateKey the PrivateKey from this entry

toString

Added in API level 1
String toString ()

返回此PrivateKeyEntry的字符串表示形式。

返回(Returns)
String a string representation of this PrivateKeyEntry.

Hooray!