|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.security.AlgorithmParameters
public class AlgorithmParameters
This class provides functionality for dealing with the parameters to the various security algorithms.
| Constructor Summary | |
|---|---|
protected |
AlgorithmParameters(AlgorithmParametersSpi paramSpi,
Provider provider,
String algName)
Constructs a new instance of this class capable of holding the parameter for the specified algorithm. |
| Method Summary | |
|---|---|
String |
getAlgorithm()
Answers the standard Java security name for the algorithm for which the receiver can hold the arguments. |
byte[] |
getEncoded()
Answers the parameters in their primary encoding format. |
byte[] |
getEncoded(String format)
Answers the parameters in the specified format. |
static AlgorithmParameters |
getInstance(String algorithmName)
Answers a new AlgorithmParameters for the algorithm described by the argument. |
static AlgorithmParameters |
getInstance(String algorithm,
Provider provider)
Answers a new AlgorithmParameters which is capable of running the algorithm described by the argument. |
static AlgorithmParameters |
getInstance(String algorithmName,
String providerName)
Answers a new AlgorithmParameters which is capable of running the algorithm described by the argument. |
AlgorithmParameterSpec |
getParameterSpec(Class paramSpec)
Answers the parameter specification for the receiver, instantiated from the provided class. |
Provider |
getProvider()
Answers the Provider of the algorithm parameters represented by the receiver. |
void |
init(AlgorithmParameterSpec paramSpec)
Initializes the receiver with the given parameter specification. |
void |
init(byte[] params)
Initializes the receiver with the given parameters which are encoded in the primary format. |
void |
init(byte[] params,
String format)
Initializes the receiver with the parameters encoded in the given named format. |
String |
toString()
Answers a string containing a concise, human-readable description of the receiver. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected AlgorithmParameters(AlgorithmParametersSpi paramSpi,
Provider provider,
String algName)
paramSpi - AlgorithmParametersSpi
The actual provider-supplied implementation.provider - Provider
The provider of the algorithm parameters.algName - String
Algorithm name.| Method Detail |
|---|
public final String getAlgorithm()
public final byte[] getEncoded()
throws IOException
IOException - if encoding errors are detected.public final byte[] getEncoded(String format)
throws IOException
format - String
The desired encoding format name.
IOException - if encoding errors are detectedpublic static AlgorithmParameters getInstance(String algorithmName)
throws NoSuchAlgorithmException
algorithmName - String
Name of the desired algorithm.
NoSuchAlgorithmException - If the algorithm cannot be foundpublic static AlgorithmParameters getInstance(String algorithmName,
String providerName)
throws NoSuchAlgorithmException,
NoSuchProviderException
algorithmName - String
Name of the desired algorithm.providerName - String
Name of the provider which has to implement the algorithm.
NoSuchAlgorithmException - If the algorithm cannot be found.
NoSuchProviderException - If the provider cannot be found.public static AlgorithmParameters getInstance(String algorithm,
Provider provider)
throws NoSuchAlgorithmException
algorithm - String
Name of the desired algorithm.provider - Provider
Provider which has to implement the algorithm.
NoSuchAlgorithmException - If the algorithm cannot be found.public final AlgorithmParameterSpec getParameterSpec(Class paramSpec)
throws InvalidParameterSpecException
paramSpec - Class
Class to use when instantiating the result.
InvalidParameterSpecException - if the requested specification is not appropriate
for the receiver.public final Provider getProvider()
public final void init(byte[] params)
throws IOException
params - byte[]
Parameters encoded in the primary format for the receiver.
IOException - if decoding errors are detected.public final void init(byte[] params,
String format)
throws IOException
params - byte[]
Parameters encoded in the named format.format - String
name of the format in which the parameters are encoded.
IOException - if decoding errors are detected.public final void init(AlgorithmParameterSpec paramSpec)
throws InvalidParameterSpecException
paramSpec - AlgorithmParameterSpec
The parameter specification to be used.
InvalidParameterSpecException - if the provided specification is not appropriate
for the receiver.public final String toString()
toString in class Object
|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||