com.ibm.crypto.fips.provider
Class DHParameterGenerator
java.lang.Object
|
+--java.security.AlgorithmParameterGeneratorSpi
|
+--com.ibm.crypto.fips.provider.DHParameterGenerator
- All Implemented Interfaces:
- AlgorithmStatus
- public final class DHParameterGenerator
- extends java.security.AlgorithmParameterGeneratorSpi
- implements AlgorithmStatus
Method Summary |
protected java.security.AlgorithmParameters |
engineGenerateParameters()
Generates the parameters. |
protected void |
engineInit(java.security.spec.AlgorithmParameterSpec genParamSpec,
java.security.SecureRandom random)
Initializes this parameter generator with a set of parameter
generation values, which specify the size of the prime modulus and
the size of the random exponent, both in bits. |
protected void |
engineInit(int keysize,
java.security.SecureRandom random)
Initializes this parameter generator for a certain keysize
and source of randomness. |
protected java.security.AlgorithmParameters |
internalGenerateParameters()
Generates the parameters. |
protected void |
internalInit(java.security.spec.AlgorithmParameterSpec genParamSpec,
java.security.SecureRandom random)
Initializes this parameter generator with a set of parameter
generation values, which specify the size of the prime modulus and
the size of the random exponent, both in bits. |
protected void |
internalInit(int keysize,
java.security.SecureRandom random)
Initializes this parameter generator for a certain keysize
and source of randomness. |
boolean |
isFipsApproved()
This function allows an application to verify the the algorithm is
FIPS approved. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DHParameterGenerator
public DHParameterGenerator()
engineInit
protected void engineInit(int keysize,
java.security.SecureRandom random)
- Initializes this parameter generator for a certain keysize
and source of randomness.
The keysize is specified as the size in bits of the prime modulus.
- Overrides:
engineInit
in class java.security.AlgorithmParameterGeneratorSpi
- Parameters:
keysize
- the keysize (size of prime modulus) in bitsrandom
- the source of randomness
internalInit
protected void internalInit(int keysize,
java.security.SecureRandom random)
- Initializes this parameter generator for a certain keysize
and source of randomness.
The keysize is specified as the size in bits of the prime modulus.
- Parameters:
keysize
- the keysize (size of prime modulus) in bitsrandom
- the source of randomness
isFipsApproved
public boolean isFipsApproved()
- This function allows an application to verify the the algorithm is
FIPS approved.
- Specified by:
isFipsApproved
in interface AlgorithmStatus
- See Also:
AlgorithmStatus.isFipsApproved()
engineInit
protected void engineInit(java.security.spec.AlgorithmParameterSpec genParamSpec,
java.security.SecureRandom random)
throws java.security.InvalidAlgorithmParameterException
- Initializes this parameter generator with a set of parameter
generation values, which specify the size of the prime modulus and
the size of the random exponent, both in bits.
- Overrides:
engineInit
in class java.security.AlgorithmParameterGeneratorSpi
- Parameters:
params
- the set of parameter generation valuesrandom
- the source of randomness- Throws:
java.security.InvalidAlgorithmParameterException
- if the given parameter
generation values are inappropriate for this parameter generator
internalInit
protected void internalInit(java.security.spec.AlgorithmParameterSpec genParamSpec,
java.security.SecureRandom random)
throws java.security.InvalidAlgorithmParameterException
- Initializes this parameter generator with a set of parameter
generation values, which specify the size of the prime modulus and
the size of the random exponent, both in bits.
- Parameters:
params
- the set of parameter generation valuesrandom
- the source of randomness- Throws:
java.security.InvalidAlgorithmParameterException
- if the given parameter
generation values are inappropriate for this parameter generator
engineGenerateParameters
protected java.security.AlgorithmParameters engineGenerateParameters()
- Generates the parameters.
- Overrides:
engineGenerateParameters
in class java.security.AlgorithmParameterGeneratorSpi
- Returns:
- the new AlgorithmParameters object
internalGenerateParameters
protected java.security.AlgorithmParameters internalGenerateParameters()
- Generates the parameters.
- Returns:
- the new AlgorithmParameters object