Methods Summary |
---|
public final java.security.AlgorithmParameters | generateParameters()Computes and returns {@code AlgorithmParameters} for this generator's
algorithm.
return spiImpl.engineGenerateParameters();
|
public final java.lang.String | getAlgorithm()Returns the name of the algorithm.
return algorithm;
|
public static java.security.AlgorithmParameterGenerator | getInstance(java.lang.String algorithm)Returns a new instance of {@code AlgorithmParameterGenerator} for the
specified algorithm.
if (algorithm == null) {
throw new NullPointerException(Messages.getString("security.01")); //$NON-NLS-1$
}
synchronized (engine) {
engine.getInstance(algorithm, null);
return new AlgorithmParameterGenerator(
(AlgorithmParameterGeneratorSpi) engine.spi, engine.provider,
algorithm);
}
|
public static java.security.AlgorithmParameterGenerator | getInstance(java.lang.String algorithm, java.lang.String provider)Returns a new instance of {@code AlgorithmParameterGenerator} from the
specified provider for the specified algorithm.
if ((provider == null) || (provider.length() == 0)) {
throw new IllegalArgumentException(
Messages.getString("security.02")); //$NON-NLS-1$
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
throw new NoSuchProviderException(provider);
}
return getInstance(algorithm, impProvider);
|
public static java.security.AlgorithmParameterGenerator | getInstance(java.lang.String algorithm, java.security.Provider provider)Returns a new instance of {@code AlgorithmParameterGenerator} from the
specified provider for the specified algorithm.
if (provider == null) {
throw new IllegalArgumentException(Messages.getString("security.04")); //$NON-NLS-1$
}
if (algorithm == null) {
throw new NullPointerException(Messages.getString("security.01")); //$NON-NLS-1$
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
return new AlgorithmParameterGenerator(
(AlgorithmParameterGeneratorSpi) engine.spi, provider,
algorithm);
}
|
public final java.security.Provider | getProvider()Returns the provider associated with this {@code
AlgorithmParameterGenerator}.
return provider;
|
public final void | init(java.security.spec.AlgorithmParameterSpec genParamSpec, java.security.SecureRandom random)Initializes this {@code AlgorithmParameterGenerator} with the given
{@code AlgorithmParameterSpec} and the given {@code SecureRandom}.
spiImpl.engineInit(genParamSpec, random);
|
public final void | init(int size)Initializes this {@code AlgorithmParameterGenerator} with the given size.
The default parameter set and a default {@code SecureRandom} instance
will be used.
spiImpl.engineInit(size, randm);
|
public final void | init(int size, java.security.SecureRandom random)Initializes this {@code AlgorithmParameterGenerator} with the given size
and the given {@code SecureRandom}. The default parameter set will be
used.
spiImpl.engineInit(size, random);
|
public final void | init(java.security.spec.AlgorithmParameterSpec genParamSpec)Initializes this {@code AlgorithmParameterGenerator} with the given {@code
AlgorithmParameterSpec}. A default {@code SecureRandom} instance will be
used.
spiImpl.engineInit(genParamSpec, randm);
|