| Constructor and Description |
|---|
AesCmac(byte[] key,
int tagSizeInBytes) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
computeMac(byte[] data)
Computes message authentication code (MAC) for
data. |
void |
verifyMac(byte[] mac,
byte[] data)
Verifies whether
mac is a correct authentication code (MAC) for data. |
public AesCmac(byte[] key,
int tagSizeInBytes)
throws GeneralSecurityException
GeneralSecurityExceptionpublic byte[] computeMac(byte[] data)
throws GeneralSecurityException
Macdata.computeMac in interface MacGeneralSecurityExceptionpublic void verifyMac(byte[] mac,
byte[] data)
throws GeneralSecurityException
Macmac is a correct authentication code (MAC) for data.verifyMac in interface MacGeneralSecurityException - if mac is not a correct MAC for data