- java.lang.Object
 -  
      
- javax.security.auth.x500.X500PrivateCredential
 
 
-  
       
- 实现的所有接口
 -  
         
Destroyable 
public final class X500PrivateCredential extends Object implements Destroyable
此类代表
X500PrivateCredential。 它将X.509证书,相应的私钥和用于引用KeyStore中的确切密钥对的KeyStore别名相关联。 这样可以在主题中查找X.500主体的私有凭据。- 从以下版本开始:
 - 1.4
 
 
-  
        
       
-  
             
构造方法摘要
构造方法 构造器 描述 X500PrivateCredential(X509Certificate cert, PrivateKey key)创建一个X500PrivateCredential,它关联X.509证书,私钥和KeyStore别名。X500PrivateCredential(X509Certificate cert, PrivateKey key, String alias)创建一个X500PrivateCredential,它关联X.509证书,私钥和KeyStore别名。 
-  
             
方法摘要
所有方法 实例方法 具体的方法 变量和类型 方法 描述 voiddestroy()清除此对象中对X.509证书,私钥和KeyStore别名的引用。StringgetAlias()返回KeyStore别名。X509CertificategetCertificate()返回X.509证书。PrivateKeygetPrivateKey()返回PrivateKey。booleanisDestroyed()确定是否已清除对该对象中的X.509证书和私钥的引用。 
 -  
             
 
-  
        
       
-  
             
构造方法详细信息
-  
X500PrivateCredential
public X500PrivateCredential(X509Certificate cert, PrivateKey key)
创建一个X500PrivateCredential,它关联X.509证书,私钥和KeyStore别名。- 参数
 -  
              
cert-cert -  
              
key- 证书的PrivateKey - 异常
 -  
              
IllegalArgumentException- 如果cert或key为空 
 
-  
X500PrivateCredential
public X500PrivateCredential(X509Certificate cert, PrivateKey key, String alias)
创建一个X500PrivateCredential,它关联X.509证书,私钥和KeyStore别名。- 参数
 -  
              
cert-cert -  
              
key- 证书的PrivateKey -  
              
alias- KeyStore别名 - 异常
 -  
              
IllegalArgumentException-如果任一cert,key或alias为null 
 
 -  
 
-  
             
方法详细信息
-  
getCertificate
public X509Certificate getCertificate()
返回X.509证书。- 结果
 - X509证书
 
 
-  
getPrivateKey
public PrivateKey getPrivateKey()
返回PrivateKey。- 结果
 - 私人钥匙
 
 
-  
getAlias
public String getAlias()
返回KeyStore别名。- 结果
 - KeyStore别名
 
 
-  
destroy
public void destroy()
清除此对象中对X.509证书,私钥和KeyStore别名的引用。- Specified by:
 -  
              
destroy在界面Destroyable 
 
-  
isDestroyed
public boolean isDestroyed()
确定是否已清除对该对象中的X.509证书和私钥的引用。- Specified by:
 -  
              
isDestroyed接口Destroyable - 结果
 - 如果X509Certificate和PrivateKey为null,则为true
 
 
 -  
 
 -