public class DHGenParameterSpec
extends Object implements AlgorithmParameterSpec
| java.lang.Object | |
| javax.crypto.spec.DHGenParameterSpec | |
此类指定用于生成Diffie-Hellman(系统)参数以用于Diffie-Hellman密钥协议的参数集。 这通常由中央当局完成。
中央当局在计算参数后,必须将此信息发送给希望就密钥达成一致的各方。
也可以看看:
Public constructors |
|
|---|---|
DHGenParameterSpec(int primeSize, int exponentSize) 构建用于生成Diffie-Hellman(系统)参数的参数集。 |
|
公共方法(Public methods) |
|
|---|---|
int |
getExponentSize() 返回随机指数(私有值)的大小(以位为单位)。 |
int |
getPrimeSize() 返回质数模的位数。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
DHGenParameterSpec (int primeSize,
int exponentSize)
构建用于生成Diffie-Hellman(系统)参数的参数集。 将构建的参数集可以被用来初始化一个AlgorithmParameterGenerator用于Diffie-Hellman参数的生成对象。
| 参数(Parameters) | |
|---|---|
primeSize |
int: the size (in bits) of the prime modulus. |
exponentSize |
int: the size (in bits) of the random exponent. |
int getExponentSize ()
返回随机指数(私有值)的大小(以位为单位)。
| 返回(Returns) | |
|---|---|
int |
the size in bits of the random exponent (private value) |
int getPrimeSize ()
返回质数模的位数。
| 返回(Returns) | |
|---|---|
int |
the size in bits of the prime modulus |