JavaTM 2 Platform
Standard Ed. 6

介面 java.security.PrivateKey
的使用

使用 PrivateKey 的軟體套件
java.security 為安全框架提供類別和介面。 
java.security.interfaces 提供的介面用於產生 RSA Laboratory Technical Note PKCS#1 中定義的 RSA(Rivest、Shamir 和 Adleman AsymmetricCipher 演算法)密鑰,以及 NIST 的 FIPS-186 中定義的 DSA(數位簽章演算法)密鑰。 
javax.crypto.interfaces 根據 RSA Laboratories' PKCS #3 的定義,提供 Diffie-Hellman 密鑰介面。 
javax.net.ssl 提供用於安全Socket層(SSL)套件的類別。 
javax.security.auth.x500 此套件包含應該用來在 Subject 中存儲 X500 Principal 和 X500 Private Crendentials 的類別。 
 

java.security 中 PrivateKey 的使用
 

返回 PrivateKey 的 java.security 中的方法
protected abstract  PrivateKey KeyFactorySpi.engineGeneratePrivate(KeySpec keySpec)
          根據所提供的密鑰規範(密鑰材料)產生私鑰物件。
 PrivateKey KeyFactory.generatePrivate(KeySpec keySpec)
          根據提供的密鑰規範(密鑰材料)產生私鑰物件。
 PrivateKey KeyPair.getPrivate()
          返回對此密鑰對的私鑰元件的參考。
 PrivateKey KeyStore.PrivateKeyEntry.getPrivateKey()
          從此項獲取 PrivateKey。
 PrivateKey Signer.getPrivateKey()
          已過時。 返回此 signer 的私鑰。
 

參數型別為 PrivateKey 的 java.security 中的方法
protected abstract  void SignatureSpi.engineInitSign(PrivateKey privateKey)
          通過用於簽章操作的指定私鑰初始化此簽章物件。
protected  void SignatureSpi.engineInitSign(PrivateKey privateKey, SecureRandom random)
          通過用於簽章操作的指定私鑰和隨機源初始化此簽章物件。
 void Signature.initSign(PrivateKey privateKey)
          初始化這個用於簽章的物件。
 void Signature.initSign(PrivateKey privateKey, SecureRandom random)
          初始化這個用於簽章的物件。
 

參數型別為 PrivateKey 的 java.security 中的建構子
KeyPair(PublicKey publicKey, PrivateKey privateKey)
          根據給定的公鑰和私鑰建構密鑰對。
KeyStore.PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain)
          建構帶 PrivateKey 和相應證書鏈的 PrivateKeyEntry。
SignedObject(Serializable object, PrivateKey signingKey, Signature signingEngine)
          通過任何可序列化物件建構 SignedObject。
 

java.security.interfaces 中 PrivateKey 的使用
 

java.security.interfaces 中 PrivateKey 的子介面
 interface DSAPrivateKey
          DSA 專用密鑰的標準介面。
 interface ECPrivateKey
          橢圓曲線 (EC) 專用密鑰的介面。
 interface RSAMultiPrimePrivateCrtKey
          如 PKCS#1 v2.1 中所定義的,使用 Chinese Remainder Theorem (CRT) 資訊值的 RSA 多素數專用密鑰的介面。
 interface RSAPrivateCrtKey
          如 PKCS#1 標準中所定義的,使用 Chinese Remainder Theorem (CRT) 資訊值的 RSA 專用密鑰的介面。
 interface RSAPrivateKey
          RSA 專用密鑰的介面。
 

javax.crypto.interfaces 中 PrivateKey 的使用
 

javax.crypto.interfaces 中 PrivateKey 的子介面
 interface DHPrivateKey
          Diffie-Hellman 私鑰介面。
 

javax.net.ssl 中 PrivateKey 的使用
 

返回 PrivateKey 的 javax.net.ssl 中的方法
 PrivateKey X509KeyManager.getPrivateKey(String alias)
          返回與給定別名關聯的密鑰。
 

javax.security.auth.x500 中 PrivateKey 的使用
 

返回 PrivateKey 的 javax.security.auth.x500 中的方法
 PrivateKey X500PrivateCredential.getPrivateKey()
          返回 PrivateKey。
 

參數型別為 PrivateKey 的 javax.security.auth.x500 中的建構子
X500PrivateCredential(X509Certificate cert, PrivateKey key)
          創建將 X.509 證書、私鑰和 KeyStore 別名聯繫在一起的 X500PrivateCredential。
X500PrivateCredential(X509Certificate cert, PrivateKey key, String alias)
          創建將 X.509 證書、私鑰和 KeyStore 別名聯繫在一起的 X500PrivateCredential。
 


JavaTM 2 Platform
Standard Ed. 6

提交錯誤或意見

版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。