public abstract class MacSpi extends Object
Mac class.Mac| Constructor and Description |
|---|
MacSpi()
Creates a new
MacSpi instance. |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Clones this
MacSpi instance. |
protected abstract byte[] |
engineDoFinal()
Computes the digest of this MAC based on the data previously specified in
engineUpdate(byte) calls. |
protected abstract int |
engineGetMacLength()
Returns the length of this MAC (in bytes).
|
protected abstract void |
engineInit(Key key,
AlgorithmParameterSpec params)
Initializes this
MacSpi instance with the specified key and
algorithm parameters. |
protected abstract void |
engineReset()
Resets this
MacSpi instance to its initial state. |
protected abstract void |
engineUpdate(byte input)
Updates this
MacSpi instance with the specified byte. |
protected abstract void |
engineUpdate(byte[] input,
int offset,
int len)
Updates this
MacSpi instance with the data from the specified
buffer input from the specified offset and length len. |
protected void |
engineUpdate(ByteBuffer input)
Updates this
MacSpi instance with the data from the specified
buffer, starting at Buffer.position(), including the next
Buffer.remaining() bytes. |
protected abstract int engineGetMacLength()
protected abstract void engineInit(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException
MacSpi instance with the specified key and
algorithm parameters.key - the key to initialize this algorithm.params - the parameters for this algorithm.InvalidKeyException - if the specified key cannot be used to initialize this
algorithm, or it is null.InvalidAlgorithmParameterException - if the specified parameters cannot be used to initialize this
algorithm.protected abstract void engineUpdate(byte input)
MacSpi instance with the specified byte.input - the byte.protected abstract void engineUpdate(byte[] input,
int offset,
int len)
MacSpi instance with the data from the specified
buffer input from the specified offset and length len.input - the buffer.offset - the offset in the buffer.len - the length of the data in the buffer.protected void engineUpdate(ByteBuffer input)
MacSpi instance with the data from the specified
buffer, starting at Buffer.position(), including the next
Buffer.remaining() bytes.input - the buffer.protected abstract byte[] engineDoFinal()
engineUpdate(byte) calls.
This MacSpi instance is reverted to its initial state and
can be used to start the next MAC computation with the same parameters or
initialized with different parameters.
protected abstract void engineReset()
MacSpi instance to its initial state.
This MacSpi instance is reverted to its initial state and can be
used to start the next MAC computation with the same parameters or
initialized with different parameters.
public Object clone() throws CloneNotSupportedException
MacSpi instance.clone in class ObjectCloneNotSupportedException - if cloning is not supported.