java.lang.Object | +--java.security.AlgorithmParameters
Untamed:
protected
AlgorithmParameters(AlgorithmParametersSpi paramSpi,
Provider provider,
String algorithm)
String
getAlgorithm()
static AlgorithmParameters
getInstance(String algorithm)
static AlgorithmParameters
getInstance(String algorithm,
Provider provider)
static AlgorithmParameters
getInstance(String algorithm,
String provider)
AlgorithmParameterSpec
getParameterSpec(Class paramSpec)
void
init(AlgorithmParameterSpec paramSpec)
paramSpec.
void
init(byte[] params)
void
init(byte[] params,
String format)
params and decodes them
according to the specified decoding scheme.
private Provider provider
private AlgorithmParametersSpi paramSpi
private String algorithm
private boolean initialized
protected AlgorithmParameters(AlgorithmParametersSpi paramSpi, Provider provider, String algorithm)
paramSpi - the delegateprovider - the provideralgorithm - the algorithmpublic final String getAlgorithm()
public static AlgorithmParameters getInstance(String algorithm) throws NoSuchAlgorithmException
If the default provider package provides an implementation of the requested algorithm, an instance of AlgorithmParameters containing that implementation is returned. If the algorithm is not available in the default package, other packages are searched.
The returned parameter object must be initialized via a call to
init, using an appropriate parameter specification or
parameter encoding.
algorithm - the name of the algorithm requested.
NoSuchAlgorithmExceptionpublic static AlgorithmParameters getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
The returned parameter object must be initialized via a call to
init, using an appropriate parameter specification or
parameter encoding.
algorithm - the name of the algorithm requested.provider - the name of the provider.
NoSuchAlgorithmException
NoSuchProviderExceptionProviderpublic static AlgorithmParameters getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException
provider doesn't have to be registered.
The returned parameter object must be initialized via a call to
init, using an appropriate parameter specification or
parameter encoding.
algorithm - the name of the algorithm requested.provider - the name of the provider.
NoSuchAlgorithmExceptionProviderpublic final Provider getProvider()
public final void init(AlgorithmParameterSpec paramSpec) throws InvalidParameterSpecException
paramSpec.
paramSpec - the parameter specification.
InvalidParameterSpecExceptionpublic final void init(byte[] params) throws IOException
params - the encoded parameters.
IOExceptionpublic final void init(byte[] params, String format) throws IOException
params and decodes them
according to the specified decoding scheme.
If format is null, the
primary decoding format for parameters is used. The primary decoding
format is ASN.1, if an ASN.1 specification for these parameters
exists.
params - the encoded parameters.format - the name of the decoding scheme.
IOExceptionpublic final AlgorithmParameterSpec getParameterSpec(Class paramSpec) throws InvalidParameterSpecException
paramSpec identifies the specification class in which
the parameters should be returned. It could, for example, be
DSAParameterSpec.class, to indicate that the
parameters should be returned in an instance of the
DSAParameterSpec class.
paramSpec - the specification class in which
the parameters should be returned.
InvalidParameterSpecExceptionpublic final byte[] getEncoded() throws IOException
IOExceptionpublic final byte[] getEncoded(String format) throws IOException
format is null, the
primary encoding format for parameters is used. The primary encoding
format is ASN.1, if an ASN.1 specification for these parameters
exists.
format - the name of the encoding format.
IOExceptionpublic final String toString()