java.security
Class AlgorithmParameterGenerator
java.lang.Object
|
+--java.security.AlgorithmParameterGenerator
public class
AlgorithmParameterGeneratorextends
ObjectAlgorithmParameterGenerator is used to generate
algorithm parameters for specified algorithms.
This class is used to generate the algorithm parameters
for a specific algorithm.
Since:Author:AlgorithmParameterGenerator
protected AlgorithmParameterGenerator(java.security.AlgorithmParameterGeneratorSpi paramGenSpi, java.security.Provider provider, java.lang.String algorithm)
Creates an instance of AlgorithmParameters
Parameters:
generateParameters
public final AlgorithmParameters generateParameters()
Generate a new set of AlgorithmParameters.
getAlgorithm
public final String getAlgorithm()
Returns the name of the algorithm used
Returns:
- A string with the name of the algorithm
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:
- a AlgorithmParameterGenerator repesenting the desired algorithm
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:
- a AlgorithmParameterGenerator repesenting the desired algorithm
Throws:
getProvider
public final Provider getProvider()
Gets the provider that the class is from.
Returns:
- the provider of this class
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: