public abstract class ExemptionMechanismSpi extends Object
ExemptionMechanism class.| Constructor and Description |
|---|
ExemptionMechanismSpi()
Create a new exemption mechanism SPI.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract byte[] |
engineGenExemptionBlob()
Return a key blob for the key that this mechanism was initialized
with.
|
protected abstract int |
engineGenExemptionBlob(byte[] output,
int outputOffset)
Generate a key blob for the key that this mechanism was initialized
with, storing it into the given byte array.
|
protected abstract int |
engineGetOutputSize(int inputLength)
Get the size of the output blob given an input key size.
|
protected abstract void |
engineInit(Key key)
Initialize this mechanism with a key.
|
protected abstract void |
engineInit(Key key,
AlgorithmParameters params)
Initialize this mechanism with a key and parameters.
|
protected abstract void |
engineInit(Key key,
AlgorithmParameterSpec params)
Initialize this mechanism with a key and parameters.
|
public ExemptionMechanismSpi()
protected abstract byte[] engineGenExemptionBlob() throws ExemptionMechanismException
ExemptionMechanismException - If generating the
blob fails.protected abstract int engineGenExemptionBlob(byte[] output, int outputOffset) throws ExemptionMechanismException, ShortBufferException
output - The destination for the key blob.outputOffset - The index in the output array to start.ExemptionMechanismException - If generating the
blob fails.ShortBufferException - If the output array is
not large enough for the key blob.protected abstract int engineGetOutputSize(int inputLength)
inputLength - The input size.protected abstract void engineInit(Key key) throws ExemptionMechanismException, InvalidKeyException
key - The key.ExemptionMechanismException - If generating the
blob fails.InvalidKeyException - If the supplied key
cannot be used.protected abstract void engineInit(Key key, AlgorithmParameters params) throws ExemptionMechanismException, InvalidAlgorithmParameterException, InvalidKeyException
key - The key.params - The parameters.ExemptionMechanismException - If generating the
blob fails.java.security.InvalidAlgorithmParameterExceptin - If the
supplied parameters are inappropriate.InvalidKeyException - If the supplied key
cannot be used.InvalidAlgorithmParameterExceptionprotected abstract void engineInit(Key key, AlgorithmParameterSpec params) throws ExemptionMechanismException, InvalidAlgorithmParameterException, InvalidKeyException
key - The key.params - The parameters.ExemptionMechanismException - If generating the
blob fails.java.security.InvalidAlgorithmParameterExceptin - If the
supplied parameters are inappropriate.InvalidKeyException - If the supplied key
cannot be used.InvalidAlgorithmParameterException