public abstract class AbstractMacSpi extends MacSpi implements Cloneable
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
engineDoFinal()
Completes the MAC computation and resets the MAC for further use, maintaining the secret key that the MAC was
initialized with.
|
protected int |
engineGetMacLength()
Returns the length of the MAC in bytes.
|
protected void |
engineInit(Key key,
AlgorithmParameterSpec params)
Initializes the MAC with the given (secret) key and algorithm parameters.
|
protected void |
engineReset()
Resets the MAC for further use, maintaining the secret key that the MAC was initialized with.
|
protected void |
engineUpdate(byte b)
Processes the given byte.
|
protected void |
engineUpdate(byte[] b,
int ofs,
int len)
Processes the first
len bytes in input, starting at offset inclusive. |
protected final byte[] engineDoFinal()
MacSpiengineDoFinal in class MacSpiprotected final int engineGetMacLength()
MacSpiengineGetMacLength in class MacSpiprotected void engineInit(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException
MacSpiengineInit in class MacSpikey - the (secret) key.params - the algorithm parameters.InvalidKeyException - if the given key is inappropriate for initializing this MAC.InvalidAlgorithmParameterException - if the given algorithm parameters are inappropriate for this MAC.protected void engineReset()
MacSpiengineReset in class MacSpiprotected final void engineUpdate(byte b)
MacSpiengineUpdate in class MacSpib - the input byte to be processed.protected final void engineUpdate(byte[] b,
int ofs,
int len)
MacSpilen bytes in input, starting at offset inclusive.engineUpdate in class MacSpib - the input buffer.ofs - the offset in input where the input starts.len - the number of bytes to process.