public final class LegacyFullMac extends Object implements Mac
| Modifier and Type | Method and Description |
|---|---|
byte[] |
computeMac(byte[] data)
Computes message authentication code (MAC) for
data. |
static Mac |
create(LegacyProtoKey key)
This method covers the cases where users created their own mac/key classes.
|
void |
verifyMac(byte[] mac,
byte[] data)
Verifies whether
mac is a correct authentication code (MAC) for data. |
public static Mac create(LegacyProtoKey key) 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