public abstract class ExemptionMechanismSpi extends Object
ExemptionMechanism class.| Constructor and Description |
|---|
ExemptionMechanismSpi()
Creates a new
ExemptionMechanismSpi instance. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract byte[] |
engineGenExemptionBlob()
Generates the result key blob for this exemption mechanism.
|
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. |
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). |
protected abstract void |
engineInit(Key key)
Initializes this
ExemptionMechanism instance with the specified
key. |
protected abstract void |
engineInit(Key key,
AlgorithmParameters params)
Initializes this
ExemptionMechanism instance with the specified
key and algorithm parameters. |
protected abstract void |
engineInit(Key key,
AlgorithmParameterSpec params)
Initializes this
ExemptionMechanism instance with the specified
key and algorithm parameters. |
public ExemptionMechanismSpi()
ExemptionMechanismSpi instance.protected abstract byte[] engineGenExemptionBlob()
throws ExemptionMechanismException
ExemptionMechanismException - if error(s) occur during generation.protected abstract int engineGenExemptionBlob(byte[] output,
int outputOffset)
throws ShortBufferException,
ExemptionMechanismException
output buffer at offset outputOffset.output - the output buffer for the result key blob.outputOffset - the offset in the output buffer to start.output buffer.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)
engineGenExemptionBlob() call, given the specified
inputLen (in bytes).inputLen - the specified input length (in bytes).protected abstract void engineInit(Key key) throws InvalidKeyException, ExemptionMechanismException
ExemptionMechanism instance with the specified
key.key - the key to initialize this instance with.InvalidKeyException - if the key cannot be used to initialize this mechanism.ExemptionMechanismException - if error(s) occur during initialization.protected abstract void engineInit(Key key, AlgorithmParameters params) throws InvalidKeyException, InvalidAlgorithmParameterException, ExemptionMechanismException
ExemptionMechanism instance with the specified
key and algorithm parameters.key - the key to initialize this instance with.params - the parameters for this exemption mechanism algorithm.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) throws InvalidKeyException, InvalidAlgorithmParameterException, ExemptionMechanismException
ExemptionMechanism instance with the specified
key and algorithm parameters.key - the key to initialize this instance with.params - the parameters for this exemption mechanism algorithm.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.