public abstract class OpenSSLMac extends MacSpi
| Modifier and Type | Class and Description |
|---|---|
static class |
OpenSSLMac.HmacMD5 |
static class |
OpenSSLMac.HmacSHA1 |
static class |
OpenSSLMac.HmacSHA224 |
static class |
OpenSSLMac.HmacSHA256 |
static class |
OpenSSLMac.HmacSHA384 |
static class |
OpenSSLMac.HmacSHA512 |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
engineDoFinal()
Computes the digest of this MAC based on the data previously specified in
MacSpi.engineUpdate(byte) calls. |
protected int |
engineGetMacLength()
Returns the length of this MAC (in bytes).
|
protected void |
engineInit(Key key,
AlgorithmParameterSpec params)
Initializes this
MacSpi instance with the specified key and
algorithm parameters. |
protected void |
engineReset()
Resets this
MacSpi instance to its initial state. |
protected void |
engineUpdate(byte input)
Updates this
MacSpi instance with the specified byte. |
protected 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. |
clone, engineUpdateprotected int engineGetMacLength()
MacSpiengineGetMacLength in class MacSpiprotected void engineInit(Key key, AlgorithmParameterSpec params) throws InvalidKeyException, InvalidAlgorithmParameterException
MacSpiMacSpi instance with the specified key and
algorithm parameters.engineInit in class MacSpikey - 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 void engineUpdate(byte input)
MacSpiMacSpi instance with the specified byte.engineUpdate in class MacSpiinput - the byte.protected void engineUpdate(byte[] input,
int offset,
int len)
MacSpiMacSpi instance with the data from the specified
buffer input from the specified offset and length len.engineUpdate in class MacSpiinput - the buffer.offset - the offset in the buffer.len - the length of the data in the buffer.protected byte[] engineDoFinal()
MacSpiMacSpi.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.
engineDoFinal in class MacSpiprotected void engineReset()
MacSpiMacSpi 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.
engineReset in class MacSpi