FileDocCategorySizeDatePackage
ExemptionMechanismSpi.javaAPI DocAndroid 1.5 API5372Wed May 06 22:41:02 BST 2009javax.crypto

ExemptionMechanismSpi

public abstract class ExemptionMechanismSpi extends Object
The Service Provider Interface (SPI) definition for the {@code ExemptionMechanism} class.
since
Android 1.0

Fields Summary
Constructors Summary
public ExemptionMechanismSpi()
Creates a new {@code ExemptionMechanismSpi} instance.

since
Android 1.0

    
Methods Summary
protected abstract byte[]engineGenExemptionBlob()
Generates the result key blob for this exemption mechanism.

return
the result key blob for this exemption mechanism.
throws
ExemptionMechanismException if error(s) occur during generation.
since
Android 1.0

protected abstract intengineGenExemptionBlob(byte[] output, int outputOffset)
Generates the result key blob for this exemption mechanism and stores it into the {@code output} buffer at offset {@code outputOffset}.

param
output the output buffer for the result key blob.
param
outputOffset the offset in the output buffer to start.
return
the number of bytes written to the {@code output} buffer.
throws
ShortBufferException if the provided buffer is too small for the result key blob.
throws
ExemptionMechanismException if error(s) occur during generation.
since
Android 1.0

protected abstract intengineGetOutputSize(int inputLen)
Returns the size in bytes for the output buffer needed to hold the output of the next {@link #engineGenExemptionBlob} call, given the specified {@code inputLen} (in bytes).

param
inputLen the specified input length (in bytes).
return
the size in bytes for the output buffer.

protected abstract voidengineInit(java.security.Key key)
Initializes this {@code ExemptionMechanism} instance with the specified key.

param
key the key to initialize this instance with.
throws
InvalidKeyException if the key cannot be used to initialize this mechanism.
throws
ExemptionMechanismException if error(s) occur during initialization.
since
Android 1.0

protected abstract voidengineInit(java.security.Key key, java.security.AlgorithmParameters params)
Initializes this {@code ExemptionMechanism} instance with the specified key and algorithm parameters.

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

protected abstract voidengineInit(java.security.Key key, java.security.spec.AlgorithmParameterSpec params)
Initializes this {@code ExemptionMechanism} instance with the specified key and algorithm parameters.

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