public class Poly1305 extends Object
This is not an implementation of the MAC interface on purpose and it is not equivalent to HMAC.
The implementation is based on poly1305 implementation by Andrew Moon (https://github.com/floodyberry/poly1305-donna) and released as public domain.
| Modifier and Type | Field and Description |
|---|---|
static int |
MAC_KEY_SIZE_IN_BYTES |
static int |
MAC_TAG_SIZE_IN_BYTES |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
computeMac(byte[] key,
byte[] data)
Computes Poly1305 MAC over
data using key. |
static void |
verifyMac(byte[] key,
byte[] data,
byte[] mac)
Verifies Poly1305 over
data using key. |
public static final int MAC_TAG_SIZE_IN_BYTES
public static final int MAC_KEY_SIZE_IN_BYTES
public static byte[] computeMac(byte[] key,
byte[] data)
data using key.public static void verifyMac(byte[] key,
byte[] data,
byte[] mac)
throws GeneralSecurityException
data using key.GeneralSecurityException