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)
Initializes this ExemptionMechanism instance with the specified key.
abstract void engineInit(Key key, AlgorithmParameterSpec params)
Initializes this ExemptionMechanism instance with the specified key and algorithm parameters.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ExemptionMechanismSpi ()

Creates a new ExemptionMechanismSpi instance.

Protected Methods

protected abstract byte[] engineGenExemptionBlob ()

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)

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)

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)

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)

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.

protected abstract void engineInit (Key key, AlgorithmParameterSpec params)

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.