public class Poly1305Mac extends java.lang.Object implements Mac
Modifier and Type | Field and Description |
---|---|
private static int |
BLOCK_SIZE |
private byte[] |
currentBlock |
private int |
currentBlockOffset |
private int |
h0 |
private int |
h1 |
private int |
h2 |
private int |
h3 |
private int |
h4 |
private int |
k0 |
private int |
k1 |
private int |
k2 |
private int |
k3 |
static int |
KEY_BYTES |
private int |
r0 |
private int |
r1 |
private int |
r2 |
private int |
r3 |
private int |
r4 |
private int |
s1 |
private int |
s2 |
private int |
s3 |
private int |
s4 |
Constructor and Description |
---|
Poly1305Mac() |
Modifier and Type | Method and Description |
---|---|
void |
doFinal(byte[] out,
int offset) |
java.lang.String |
getAlgorithm() |
int |
getBlockSize() |
int |
getDefaultBlockSize() |
void |
init(byte[] key) |
private static void |
packIntLE(int value,
byte[] dst,
int off) |
private void |
processBlock() |
private void |
reset() |
private static int |
unpackIntLE(byte[] buf,
int off) |
private static long |
unsignedProduct(int i1,
int i2) |
void |
update(byte[] in,
int offset,
int length) |
void |
updateUInt(long value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isEncryptThenMac
public static final int KEY_BYTES
private static final int BLOCK_SIZE
private int r0
private int r1
private int r2
private int r3
private int r4
private int s1
private int s2
private int s3
private int s4
private int k0
private int k1
private int k2
private int k3
private int h0
private int h1
private int h2
private int h3
private int h4
private final byte[] currentBlock
private int currentBlockOffset
public java.lang.String getAlgorithm()
getAlgorithm
in interface AlgorithmNameProvider
public void init(byte[] key) throws java.lang.Exception
public void updateUInt(long value)
updateUInt
in interface Mac
public void doFinal(byte[] out, int offset) throws java.lang.Exception
private void processBlock()
private void reset()
public int getBlockSize()
getBlockSize
in interface MacInformation
public int getDefaultBlockSize()
getDefaultBlockSize
in interface MacInformation
private static int unpackIntLE(byte[] buf, int off)
private static void packIntLE(int value, byte[] dst, int off)
private static long unsignedProduct(int i1, int i2)