Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public abstract class

ExemptionMechanismSpi

extends Object
java.lang.Object
   ↳ javax.crypto.ExemptionMechanismSpi

Class Overview

The Service Provider Interface ( SPI ) definition for the ExemptionMechanism class.

Summary

Public Constructors
ExemptionMechanismSpi ()
Creates a new ExemptionMechanismSpi instance.
Protected Methods
abstract byte[] engineGenExemptionBlob ()
Generates the result key blob for this exemption mechanism.
abstract int engineGenExemptionBlob (byte[] output, int outputOffset)
Generates the result key blob for this exemption mechanism and stores it into the output buffer at offset outputOffset .
abstract int engineGetOutputSize (int inputLen)
Returns the size in bytes for the output buffer needed to hold the output of the next engineGenExemptionBlob() call, given the specified inputLen (in bytes).
abstract void engineInit ( Key key, AlgorithmParameters params)
Initializes this ExemptionMechanism instance with the specified key and algorithm parameters.
abstract void engineInit ( Key key, AlgorithmParameterSpec params)
Initializes this ExemptionMechanism instance with the specified key and algorithm parameters.
abstract void engineInit ( Key key)
Initializes this ExemptionMechanism instance with the specified key.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ExemptionMechanismSpi ()

Added in API level 1

Creates a new ExemptionMechanismSpi instance.

Protected Methods

protected abstract byte[] engineGenExemptionBlob ()

Added in API level 1

Generates the result key blob for this exemption mechanism.

Returns
  • the result key blob for this exemption mechanism.
Throws
ExemptionMechanismException if error(s) occur during generation.

protected abstract int engineGenExemptionBlob (byte[] output, int outputOffset)

Added in API level 1

Generates the result key blob for this exemption mechanism and stores it into the output buffer at offset outputOffset .

Parameters
output the output buffer for the result key blob.
outputOffset the offset in the output buffer to start.
Returns
  • the number of bytes written to the output buffer.
Throws
ShortBufferException if the provided buffer is too small for the result key blob.
ExemptionMechanismException if error(s) occur during generation.

protected abstract int engineGetOutputSize (int inputLen)

Added in API level 1

Returns the size in bytes for the output buffer needed to hold the output of the next engineGenExemptionBlob() call, given the specified inputLen (in bytes).

Parameters
inputLen the specified input length (in bytes).
Returns
  • the size in bytes for the output buffer.

protected abstract void engineInit ( Key key, AlgorithmParameters params)

Added in API level 1

Initializes this ExemptionMechanism instance with the specified key and algorithm parameters.

Parameters
key the key to initialize this instance with.
params the parameters for this exemption mechanism algorithm.
Throws
InvalidKeyException if the key cannot be used to initialize this mechanism.
InvalidAlgorithmParameterException if the parameters cannot be used to initialize this mechanism.
ExemptionMechanismException if error(s) occur during initialization.

protected abstract void engineInit ( Key key, AlgorithmParameterSpec params)

Added in API level 1

Initializes this ExemptionMechanism instance with the specified key and algorithm parameters.

Parameters
key the key to initialize this instance with.
params the parameters for this exemption mechanism algorithm.
Throws
InvalidKeyException if the key cannot be used to initialize this mechanism.
InvalidAlgorithmParameterException the the parameters cannot be used to initialize this mechanism.
ExemptionMechanismException if error(s) occur during initialization.

protected abstract void engineInit ( Key key)

Added in API level 1

Initializes this ExemptionMechanism instance with the specified key.

Parameters
key the key to initialize this instance with.
Throws
InvalidKeyException if the key cannot be used to initialize this mechanism.
ExemptionMechanismException if error(s) occur during initialization.