net.i2p.crypto.eddsa
Class KeyPairGenerator
java.lang.Object
java.security.KeyPairGeneratorSpi
net.i2p.crypto.eddsa.KeyPairGenerator
public class KeyPairGenerator
- extends KeyPairGeneratorSpi
Default strength is 256
- Since:
- 0.9.15
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KeyPairGenerator
public KeyPairGenerator()
initialize
public void initialize(int strength,
SecureRandom random)
- Specified by:
initialize
in class KeyPairGeneratorSpi
initialize
public void initialize(AlgorithmParameterSpec params,
SecureRandom random)
throws InvalidAlgorithmParameterException
- Overrides:
initialize
in class KeyPairGeneratorSpi
- Throws:
InvalidAlgorithmParameterException
generateKeyPair
public KeyPair generateKeyPair()
- Specified by:
generateKeyPair
in class KeyPairGeneratorSpi
createNamedCurveSpec
protected EdDSANamedCurveSpec createNamedCurveSpec(String curveName)
throws InvalidAlgorithmParameterException
- Create an EdDSANamedCurveSpec from the provided curve name. The current
implementation fetches the pre-created curve spec from a table.
- Parameters:
curveName
- the EdDSA named curve.
- Returns:
- the specification for the named curve.
- Throws:
InvalidAlgorithmParameterException
- if the named curve is unknown.