public class I2PHMac extends Object implements Mac
| Constructor and Description |
|---|
I2PHMac(MessageDigest digest)
Deprecated.
Use javax.crypto.Mac
|
I2PHMac(MessageDigest digest,
int sz) |
| Modifier and Type | Method and Description |
|---|---|
int |
doFinal(byte[] out,
int outOff)
Compute the final statge of the MAC writing the output to the out
parameter.
|
String |
getAlgorithmName()
Return the name of the algorithm the MAC implements.
|
int |
getMacSize()
Return the block size for this cipher (in bytes).
|
MessageDigest |
getUnderlyingDigest() |
void |
init(byte[] key)
Initialise the MAC.
|
void |
reset()
Reset the mac generator.
|
void |
update(byte in)
add a single byte to the mac for processing.
|
void |
update(byte[] in,
int inOff,
int len) |
@Deprecated public I2PHMac(MessageDigest digest)
public I2PHMac(MessageDigest digest, int sz)
sz - override the digest's size, nonstandard if different.
SEE NOTES in HMACGenerator about why this isn't compatible with standard HmacMD5public String getAlgorithmName()
MacgetAlgorithmName in interface Macpublic MessageDigest getUnderlyingDigest()
public void init(byte[] key)
Macpublic int getMacSize()
MacgetMacSize in interface Macpublic void update(byte in)
Macpublic void update(byte[] in,
int inOff,
int len)
public int doFinal(byte[] out,
int outOff)
MacdoFinal leaves the MAC in the same state it was after the last init.