AlgorithmParameters

This class is used as an opaque representation of cryptographic parameters.

<p>An {@code AlgorithmParameters} object for managing the parameters for a particular algorithm can be obtained by calling one of the {@code getInstance} factory methods (static methods that return instances of a given class).

<p>Once an {@code AlgorithmParameters} object is obtained, it must be initialized via a call to {@code init}, using an appropriate parameter specification or parameter encoding.

<p>A transparent parameter specification is obtained from an {@code AlgorithmParameters} object via a call to {@code getParameterSpec}, and a byte encoding of the parameters is obtained via a call to {@code getEncoded}.

<p> Every implementation of the Java platform is required to support the following standard {@code AlgorithmParameters} algorithms: <ul> <li>{@code AES}</li> <li>{@code DES}</li> <li>{@code DESede}</li> <li>{@code DiffieHellman}</li> <li>{@code DSA}</li> </ul> These algorithms are described in the <a href= "{@docRoot}/../technotes/guides/security/StandardNames.html#AlgorithmParameters"> AlgorithmParameters section</a> of the Java Cryptography Architecture Standard Algorithm Name Documentation. Consult the release documentation for your implementation to see if any other algorithms are supported.

@author Jan Luehe

More...

Constructors

this
this(AlgorithmParametersSpi paramSpi, Provider provider, string algorithm)

Creates an AlgorithmParameters object.

Members

Functions

getAlgorithm
string getAlgorithm()

Returns the name of the algorithm associated with this parameter object.

getEncoded
byte[] getEncoded()

Returns the parameters in their primary encoding format. The primary encoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.

getEncoded
byte[] getEncoded(string format)

Returns the parameters encoded in the specified scheme. If {@code 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.

getProvider
Provider getProvider()

Returns the provider of this parameter object.

initilize
void initilize(AlgorithmParameterSpec paramSpec)

Initializes this parameter object using the parameters specified in {@code paramSpec}.

initilize
void initilize(byte[] params)

Imports the specified parameters and decodes them according to the primary decoding format for parameters. The primary decoding format for parameters is ASN.1, if an ASN.1 specification for this type of parameters exists.

initilize
void initilize(byte[] params, string format)

Imports the parameters from {@code params} and decodes them according to the specified decoding scheme. If {@code 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.

toString
string toString()

Returns a formatted string describing the parameters.

Static functions

getInstance
AlgorithmParameters getInstance(string algorithm)

Returns a parameter object for the specified algorithm.

Detailed Description

@see java.security.spec.AlgorithmParameterSpec @see java.security.spec.DSAParameterSpec @see KeyPairGenerator

@since 1.2

Meta