public class DHParameterSpec extends Object implements AlgorithmParameterSpec
一个中央机构产生的参数,并给他们的两个实体,寻求产生一个秘密密钥。参数是一个最好的p
,底座g
,和任选地在私人价值位长度,l
。
这是可能的,一个以上的一个实例的参数可能会产生一个给定的中央权威,并有可能是一个以上的中央机关。事实上,每一个个体都可能是它自己的中心权威,不同的实体有不同的参数。
请注意,这个类不在指定的参数上执行任何验证。因此,即使它们是空的,指定的值也将直接返回。
KeyAgreement
Constructor and Description |
---|
DHParameterSpec(BigInteger p, BigInteger g)
构造一个参数集的Diffie-Hellman,使用素数模
p 和基地的发电机
g 。
|
DHParameterSpec(BigInteger p, BigInteger g, int l)
构造一个参数集的Diffie-Hellman,使用素数模
p ,底座发电机
g ,和大小的位,
l ,随机指数(私人价值)。
|
public DHParameterSpec(BigInteger p, BigInteger g)
p
和基地的发电机
g
。
p
的素数模
g
基地的发电机
public DHParameterSpec(BigInteger p, BigInteger g, int l)
p
,底座发电机
g
,和大小的位,
l
,随机指数(私人价值)。
p
的素数模
g
基地的发电机
l
在随机指数位的大小(私人价值)
public BigInteger getP()
p
。
p
public BigInteger getG()
g
。
g
public int getL()
l
,随机指数(私人价值)。
l
大小的随机指数(私人价值),或0如果这个尺寸尚未确定
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.