@Immutable public class HmacValidator extends java.lang.Object implements SignatureValidator
| Constructor and Description |
|---|
HmacValidator(java.lang.String secret) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this object.
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
validate(byte[] toBeValidated,
byte[] signatureBytes)
Validates a given byte array with HMAC.
|
public boolean validate(byte[] toBeValidated,
byte[] signatureBytes)
validate in interface SignatureValidatortoBeValidated - a byte array to be validated.signatureBytes - a hash (signature) derived by HMAC hashing.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
HmacValidator and both instances have the same
equals in class java.lang.Objecto - an object to be tested for equalitytrue if the other object is "equal to" this object otherwise false