Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ExemptionMechanismSpi

public abstract class ExemptionMechanismSpi
extends Object

java.lang.Object
   ↳ javax.crypto.ExemptionMechanismSpi


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.

Inherited methods

From class java.lang.Object

Public constructors

ExemptionMechanismSpi

Added in API level 1
ExemptionMechanismSpi ()

Creates a new ExemptionMechanismSpi instance.

Protected methods

engineGenExemptionBlob

Added in API level 1
byte[] engineGenExemptionBlob ()

Generates the result key blob for this exemption mechanism.

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

engineGenExemptionBlob

Added in API level 1
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 byte: the output buffer for the result key blob.
outputOffset int: the offset in the output buffer to start.
Returns
int 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.

engineGetOutputSize

Added in API level 1
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 int: the specified input length (in bytes).
Returns
int the size in bytes for the output buffer.

engineInit

Added in API level 1
void engineInit (Key key, 
                AlgorithmParameters params)

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

Parameters
key Key: the key to initialize this instance with.
params AlgorithmParameters: 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.

engineInit

Added in API level 1
void engineInit (Key key, 
                AlgorithmParameterSpec params)

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

Parameters
key Key: the key to initialize this instance with.
params AlgorithmParameterSpec: 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.

engineInit

Added in API level 1
void engineInit (Key key)

Initializes this ExemptionMechanism instance with the specified key.

Parameters
key 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.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.