JavaTM 2 Platform
Standard Ed. 6

javax.crypto.spec
類別 DHPublicKeySpec

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

public class DHPublicKeySpec
extends Object
implements KeySpec

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

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

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

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

建構子詳細資訊

DHPublicKeySpec

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

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

getY

public BigInteger getY()
返回公有值 y。

返回:
公有值 y

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。