public class HMACValidator extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DATA_SEPARATOR |
static String |
HMAC_SHA256_ALGORITHM |
| Constructor and Description |
|---|
HMACValidator() |
| Modifier and Type | Method and Description |
|---|---|
String |
calculateHMAC(NotificationRequestItem notificationRequestItem,
String key) |
String |
calculateHMAC(String data,
String key) |
String |
getDataToSign(NotificationRequestItem notificationRequestItem) |
String |
getDataToSign(SortedMap<String,String> postParameters) |
boolean |
validateHMAC(NotificationRequestItem notificationRequestItem,
String key) |
public static final String HMAC_SHA256_ALGORITHM
public static final String DATA_SEPARATOR
public String calculateHMAC(String data, String key) throws IllegalArgumentException, SignatureException
public String calculateHMAC(NotificationRequestItem notificationRequestItem, String key) throws IllegalArgumentException, SignatureException
public boolean validateHMAC(NotificationRequestItem notificationRequestItem, String key) throws IllegalArgumentException, SignatureException
public String getDataToSign(NotificationRequestItem notificationRequestItem) throws IllegalArgumentException
IllegalArgumentExceptionCopyright © 2022. All rights reserved.