| Constructor and Description |
|---|
PrfMac(Prf wrappedPrf,
int tagSize)
Wrap
wrappedPrf in a Mac primitive with the specified tagSize |
| 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 PrfMac(Prf wrappedPrf, int tagSize) throws GeneralSecurityException
wrappedPrf in a Mac primitive with the specified tagSizeGeneralSecurityExceptionpublic 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