# AlgorithmParametersSpi

public abstract class **AlgorithmParametersSpi** extends [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)  
This class defines the *Service Provider Interface* (**SPI** )
for the `AlgorithmParameters` class, which is used to manage
algorithm parameters.

All the abstract methods in this class must be implemented by each
cryptographic service provider who wishes to supply parameter management
for a particular algorithm.

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/java/security/AlgorithmParameters.html`
- `https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/AlgorithmParameterSpec.html`
- `https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/DSAParameterSpec.html`

### Public Constructor Summary

|---|---|
|   | [AlgorithmParametersSpi](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/AlgorithmParametersSpi.html#AlgorithmParametersSpi())() |

### Protected Method Summary

|---|---|
| abstract byte\[\] | [engineGetEncoded](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/AlgorithmParametersSpi.html#engineGetEncoded(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) format) Returns the parameters encoded in the specified format. |
| abstract byte\[\] | [engineGetEncoded](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/AlgorithmParametersSpi.html#engineGetEncoded())() Returns the parameters in their primary encoding format. |
| abstract \<T extends [AlgorithmParameterSpec](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/AlgorithmParameterSpec.html)\> T | [engineGetParameterSpec](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/AlgorithmParametersSpi.html#engineGetParameterSpec(java.lang.Class<T>))([Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<T\> paramSpec) Returns a (transparent) specification of this parameters object. |
| abstract void | [engineInit](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/AlgorithmParametersSpi.html#engineInit(java.security.spec.AlgorithmParameterSpec))([AlgorithmParameterSpec](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/AlgorithmParameterSpec.html) paramSpec) Initializes this parameters object using the parameters specified in `paramSpec`. |
| abstract void | [engineInit](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/AlgorithmParametersSpi.html#engineInit(byte[],%20java.lang.String))(byte\[\] params, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) format) Imports the parameters from `params` and decodes them according to the specified decoding format. |
| abstract void | [engineInit](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/AlgorithmParametersSpi.html#engineInit(byte[]))(byte\[\] params) Imports the specified parameters and decodes them according to the primary decoding format for parameters. |
| abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [engineToString](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/AlgorithmParametersSpi.html#engineToString())() Returns a formatted string describing the parameters. |

### Inherited Method Summary

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

## Public Constructors

#### public
**AlgorithmParametersSpi**
()

<br />

## Protected Methods

#### protected abstract byte\[\]
**engineGetEncoded**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) format)

Returns the parameters encoded in the specified format.
If `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.

##### Parameters

| format | the name of the encoding format. |
|---|---|

##### Returns

- the parameters encoded using the specified encoding scheme.

##### Throws

| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | on encoding errors. |
|---|---|

#### protected abstract byte\[\]
**engineGetEncoded**
()

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.

##### Returns

- the parameters encoded using their primary encoding format.

##### Throws

| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | on encoding errors. |
|---|---|

#### protected abstract T
**engineGetParameterSpec**
([Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<T\> paramSpec)

Returns a (transparent) specification of this parameters
object.
`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.

##### Parameters

| paramSpec | the specification class in which the parameters should be returned. |
|---|---|

##### Returns

- the parameter specification.

##### Throws

| [InvalidParameterSpecException](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/InvalidParameterSpecException.html) | if the requested parameter specification is inappropriate for this parameter object. |
|---|---|

#### protected abstract void
**engineInit**
([AlgorithmParameterSpec](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/AlgorithmParameterSpec.html) paramSpec)

Initializes this parameters object using the parameters
specified in `paramSpec`.

##### Parameters

| paramSpec | the parameter specification. |
|---|---|

##### Throws

| [InvalidParameterSpecException](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/spec/InvalidParameterSpecException.html) | if the given parameter specification is inappropriate for the initialization of this parameter object. |
|---|---|

#### protected abstract void
**engineInit**
(byte\[\] params, [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) format)

Imports the parameters from `params` and
decodes them according to the specified decoding format.
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.

##### Parameters

| params | the encoded parameters. |
| format | the name of the decoding format. |
|---|---|

##### Throws

| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | on decoding errors |
|---|---|

#### protected abstract void
**engineInit**
(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.

##### Parameters

| params | the encoded parameters. |
|---|---|

##### Throws

| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | on decoding errors |
|---|---|

#### protected abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**engineToString**
()

Returns a formatted string describing the parameters.

##### Returns

- a formatted string describing the parameters.