Package net.i2p.crypto.elgamal
Class KeyPairGenerator
java.lang.Object
java.security.KeyPairGeneratorSpi
net.i2p.crypto.elgamal.KeyPairGenerator
public final class KeyPairGenerator extends KeyPairGeneratorSpi
Modified from eddsa
Only supported strength is 2048
- Since:
- 0.9.25
-
Constructor Summary
Constructors Constructor Description KeyPairGenerator()
-
Method Summary
Modifier and Type Method Description KeyPair
generateKeyPair()
void
initialize(int strength, SecureRandom random)
void
initialize(AlgorithmParameterSpec params, SecureRandom random)
-
Constructor Details
-
KeyPairGenerator
public KeyPairGenerator()
-
-
Method Details
-
initialize
- Specified by:
initialize
in classKeyPairGeneratorSpi
- Parameters:
strength
- must be 2048random
- ignored
-
initialize
public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException- Overrides:
initialize
in classKeyPairGeneratorSpi
- Parameters:
random
- ignored- Throws:
InvalidAlgorithmParameterException
-
generateKeyPair
- Specified by:
generateKeyPair
in classKeyPairGeneratorSpi
-