|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.security.KeyPairGeneratorSpi | +--com.ibm.crypto.fips.provider.DHKeyPairGenerator
This class represents the key pair generator for Diffie-Hellman key pairs.
This key pair generator may be initialized in two different ways:
java.security.KeyPairGenerator
Constructor Summary | |
---|---|
DHKeyPairGenerator()
|
Method Summary | |
---|---|
java.security.KeyPair |
generateKeyPair()
Generates a key pair. |
void |
initialize(java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
Initializes this key pair generator for the specified parameter set and source of randomness. |
void |
initialize(int keysize,
java.security.SecureRandom random)
Initializes this key pair generator for a certain keysize and source of randomness. |
protected java.security.KeyPair |
internalGenerateKeyPair()
Generates a key pair. |
protected void |
internalInitialize(java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
Initializes this key pair generator for the specified parameter set and source of randomness. |
protected void |
internalInitialize(int keysize,
java.security.SecureRandom random)
Initializes this key pair 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 |
Constructor Detail |
public DHKeyPairGenerator()
Method Detail |
public void initialize(int keysize, java.security.SecureRandom random)
initialize
in class java.security.KeyPairGeneratorSpi
keysize
- the keysize (size of prime modulus) in bitsrandom
- the source of randomnessprotected void internalInitialize(int keysize, java.security.SecureRandom random)
keysize
- the keysize (size of prime modulus) in bitsrandom
- the source of randomnesspublic boolean isFipsApproved()
isFipsApproved
in interface AlgorithmStatus
AlgorithmStatus.isFipsApproved()
public void initialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random) throws java.security.InvalidAlgorithmParameterException
The given parameter set contains the prime modulus, the base generator, and optionally the requested size in bits of the random exponent (private value).
initialize
in class java.security.KeyPairGeneratorSpi
params
- the parameter set used to generate the key pairrandom
- the source of randomnessjava.security.InvalidAlgorithmParameterException
- if the given parameters
are inappropriate for this key pair generatorprotected void internalInitialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random) throws java.security.InvalidAlgorithmParameterException
The given parameter set contains the prime modulus, the base generator, and optionally the requested size in bits of the random exponent (private value).
params
- the parameter set used to generate the key pairrandom
- the source of randomnessjava.security.InvalidAlgorithmParameterException
- if the given parameters
are inappropriate for this key pair generatorpublic java.security.KeyPair generateKeyPair()
generateKeyPair
in class java.security.KeyPairGeneratorSpi
protected java.security.KeyPair internalGenerateKeyPair()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |