public class MACUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MACUtils.MACInput
Represents the information to be fed into the MAC generator
|
Constructor and Description |
---|
MACUtils()
Default constructor for IOC
|
Modifier and Type | Method and Description |
---|---|
byte[] |
generateMAC(String keyAlias,
MACUtils.MACInput macInput) |
protected Mac |
getMac(String keyAlias) |
protected byte[] |
longToByteArray(long l) |
void |
setKeyProvider(KeyProvider keyProvider) |
void |
setMacAlgorithm(String macAlgorithm) |
boolean |
validateMAC(String keyAlias,
byte[] expectedMAC,
MACUtils.MACInput macInput)
Compares the expectedMAC against the MAC generated from
Assumes message has been decrypted
|
public void setKeyProvider(KeyProvider keyProvider)
public void setMacAlgorithm(String macAlgorithm)
protected byte[] longToByteArray(long l) throws IOException
IOException
public byte[] generateMAC(String keyAlias, MACUtils.MACInput macInput)
public boolean validateMAC(String keyAlias, byte[] expectedMAC, MACUtils.MACInput macInput)
keyAlias
- StringexpectedMAC
- byte[]macInput
- MACInputCopyright © 2005–2018 Alfresco Software. All rights reserved.