Constructor and Description |
---|
SipHash128()
SipHash128-2-4
|
SipHash128(int c,
int d)
SipHash128-c-d
|
Modifier and Type | Method and Description |
---|---|
long |
doFinal() |
int |
doFinal(byte[] out,
int outOff)
Compute the final stage of the MAC writing the output to the out
parameter.
|
java.lang.String |
getAlgorithmName()
Return the name of the algorithm the MAC implements.
|
int |
getMacSize()
Return the block size for this MAC (in bytes).
|
void |
reset()
Reset the MAC.
|
applySipRounds, init, processMessageWord, rotateLeft, update, update
public SipHash128()
public SipHash128(int c, int d)
c
- the number of compression roundsd
- the number of finalization roundspublic java.lang.String getAlgorithmName()
Mac
getAlgorithmName
in interface Mac
getAlgorithmName
in class SipHash
public int getMacSize()
Mac
getMacSize
in interface Mac
getMacSize
in class SipHash
public long doFinal() throws DataLengthException, java.lang.IllegalStateException
doFinal
in class SipHash
DataLengthException
java.lang.IllegalStateException
public int doFinal(byte[] out, int outOff) throws DataLengthException, java.lang.IllegalStateException
Mac
doFinal leaves the MAC in the same state it was after the last init.
doFinal
in interface Mac
doFinal
in class SipHash
out
- the array the MAC is to be output to.outOff
- the offset into the out buffer the output is to start at.DataLengthException
- if there isn't enough space in out.java.lang.IllegalStateException
- if the MAC is not initialised.