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

Class AlgorithmParameterGenerator

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


public class AlgorithmParameterGenerator

extends Object

AlgorithmParameterGenerator is used to generate algorithm parameters for specified algorithms. This class is used to generate the algorithm parameters for a specific algorithm.

Since:Author:

Constructor Summary

AlgorithmParameterGenerator(java.security.AlgorithmParameterGeneratorSpi paramGenSpi, java.security.Provider provider, java.lang.String algorithm)

Creates an instance of AlgorithmParameters

Method Summary

java.security.AlgorithmParametersgenerateParameters()

Generate a new set of AlgorithmParameters.
java.lang.StringgetAlgorithm()

Returns the name of the algorithm used
static java.security.AlgorithmParameterGeneratorgetInstance(java.lang.String algorithm)

Gets an instance of the AlgorithmParameterGenerator class which generates algorithm parameters for the specified algorithm.
static java.security.AlgorithmParameterGeneratorgetInstance(java.lang.String algorithm, java.lang.String provider)

Gets an instance of the AlgorithmParameterGenerator class which generates algorithm parameters for the specified algorithm.
java.security.ProvidergetProvider()

Gets the provider that the class is from.
voidinit(int size)

Initializes the Algorithm Parameter Generator with the specified size.
voidinit(int size, java.security.SecureRandom random)

Initializes the Algorithm Parameter Generator with the specified size and source of randomness.
voidinit(java.security.spec.AlgorithmParameterSpec genParamSpec)

Initializes the Algorithm Parameter Generator with the specified AlgorithmParameterSpec.
voidinit(java.security.spec.AlgorithmParameterSpec genParamSpec, java.security.SecureRandom random)

Initializes the Algorithm Parameter Generator with the specified AlgorithmParameterSpec and source of randomness.

Constructor Details

AlgorithmParameterGenerator

protected AlgorithmParameterGenerator(java.security.AlgorithmParameterGeneratorSpi paramGenSpi, java.security.Provider provider, java.lang.String algorithm)

Creates an instance of AlgorithmParameters

Parameters:


Method Details

generateParameters

public final AlgorithmParameters generateParameters()

Generate a new set of AlgorithmParameters.


getAlgorithm

public final String getAlgorithm()

Returns the name of the algorithm used

Returns:


getInstance

public static AlgorithmParameterGenerator getInstance(java.lang.String algorithm)

Gets an instance of the AlgorithmParameterGenerator class which generates algorithm parameters for the specified algorithm. If the algorithm is not found then, it throws NoSuchAlgorithmException.

Parameters:

Returns:

Throws:


getInstance

public static AlgorithmParameterGenerator getInstance(java.lang.String algorithm, java.lang.String provider)

Gets an instance of the AlgorithmParameterGenerator class which generates algorithm parameters for the specified algorithm. If the algorithm is not found then, it throws NoSuchAlgorithmException.

Parameters:

Returns:

Throws:


getProvider

public final Provider getProvider()

Gets the provider that the class is from.

Returns:


init

public final void init(int size)

Initializes the Algorithm Parameter Generator with the specified size. (Since no source of randomness is supplied, a default one is supplied).

Parameters:


init

public final void init(int size, java.security.SecureRandom random)

Initializes the Algorithm Parameter Generator with the specified size and source of randomness.

Parameters:


init

public final void init(java.security.spec.AlgorithmParameterSpec genParamSpec)

Initializes the Algorithm Parameter Generator with the specified AlgorithmParameterSpec. (Since no source of randomness is supplied, a default one is supplied).

Parameters:


init

public final void init(java.security.spec.AlgorithmParameterSpec genParamSpec, java.security.SecureRandom random)

Initializes the Algorithm Parameter Generator with the specified AlgorithmParameterSpec and source of randomness.

Parameters: