Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.security

Class KeyPairGeneratorSpi

java.lang.Object
|
+--java.security.KeyPairGeneratorSpi


public abstract class KeyPairGeneratorSpi

extends Object

KeyPairGeneratorSpi is the interface used to generate key pairs for security algorithms.

Author:

Constructor Summary

KeyPairGeneratorSpi()

Constructs a new KeyPairGeneratorSpi

Method Summary

java.lang.Objectclone()

Returns a clone of this class.
java.security.KeyPairgenerateKeyPair()

Generates a KeyPair according the rules for the algorithm.
voidinitialize(int keysize, java.security.SecureRandom random)

Initialize the KeyPairGeneratorSpi with the specified key size and source of randomness
voidinitialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)

Initialize the KeyPairGeneratorSpi with the specified AlgorithmParameterSpec and source of randomness This is a concrete method.

Constructor Details

KeyPairGeneratorSpi

public KeyPairGeneratorSpi()

Constructs a new KeyPairGeneratorSpi


Method Details

clone

public Object clone()

Returns a clone of this class. If cloning is not supported, then by default the class throws a CloneNotSupportedException. The MessageDigestSpi provider implementation has to overload this class in order to be cloneable.


generateKeyPair

public KeyPair generateKeyPair()

Generates a KeyPair according the rules for the algorithm. Unless intialized, algorithm defaults will be used. It creates a unique key pair each time.

Returns:


initialize

public void initialize(int keysize, java.security.SecureRandom random)

Initialize the KeyPairGeneratorSpi with the specified key size and source of randomness

Parameters:


initialize

public void initialize(java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)

Initialize the KeyPairGeneratorSpi with the specified AlgorithmParameterSpec and source of randomness This is a concrete method. It may be overridden by the provider and if the AlgorithmParameterSpec class is invalid throw InvalidAlgorithmParameterException. By default this method just throws UnsupportedOperationException.

Parameters:

Throws: