JavaTM 2 Platform
Standard Ed. 6

javax.crypto.spec
類別 DHPrivateKeySpec

java.lang.Object
  繼承者 javax.crypto.spec.DHPrivateKeySpec
所有已實作的介面:
KeySpec

public class DHPrivateKeySpec
extends Object
implements KeySpec

此類別使用其關聯的參數指定一個 Diffie-Hellman 私鑰。

注意,此類別不在任何指定的參數上執行任何驗證。因此,即使給定的值為 null 也會被直接返回。

從以下版本開始:
1.4
另請參見:
DHPublicKeySpec

建構子摘要
DHPrivateKeySpec(BigInteger x, BigInteger p, BigInteger g)
          帶有一個私有值 x、一個質數模數 p 以及一個基產生器 g 的建構子。
 
方法摘要
 BigInteger getG()
          返回基產生器 g。
 BigInteger getP()
          返回質數模數 p。
 BigInteger getX()
          返回私有值 x。
 
從類別 java.lang.Object 繼承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

建構子詳細資訊

DHPrivateKeySpec

public DHPrivateKeySpec(BigInteger x,
                        BigInteger p,
                        BigInteger g)
帶有一個私有值 x、一個質數模數 p 以及一個基產生器 g 的建構子。

參數:
x - 私有值 x
p - 質數模數 p
g - 基產生器 g
方法詳細資訊

getX

public BigInteger getX()
返回私有值 x。

返回:
私有值 x

getP

public BigInteger getP()
返回質數模數 p。

返回:
質數模數 p

getG

public BigInteger getG()
返回基產生器 g。

返回:
基產生器 g

JavaTM 2 Platform
Standard Ed. 6

提交錯誤或意見

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