@Test public void testVerifySignatureSHA256() { NotificationRequestSignatureVerifier verifier = new NotificationRequestSignatureVerifier("someApiSecret", SignatureAlgorithm.SHA256); boolean actual = verifier.verifySignature( "{}", "0", "d5497e1a206ad0ba29ad09a7c0c5f22e939682d15009c15ab3199f62fefbd14b"); assertTrue(actual); }
public boolean verifySignature(String body, String timestamp, String signature) { return signedPayloadValidator.validateSignedPayload( emptyIfNull(body) + emptyIfNull(timestamp), signature); }
NotificationRequestSignatureVerifier { public boolean verifySignature(String body, String timestamp, String signature) { return signedPayloadValidator.validateSignedPayload( emptyIfNull(body) + emptyIfNull(timestamp), signature); } }
NotificationRequestSignatureVerifier { public boolean verifySignature(String body, String timestamp, String signature) { return signedPayloadValidator.validateSignedPayload( emptyIfNull(body) + emptyIfNull(timestamp), signature); } NotificationRequestSignatureVerifier(String secretKey);  NotificationRequestSignatureVerifier(String secretKey, SignatureAlgorithm signatureAlgorithm); }
NotificationRequestSignatureVerifier { public boolean verifySignature(String body, String timestamp, String signature) { return signedPayloadValidator.validateSignedPayload( emptyIfNull(body) + emptyIfNull(timestamp), signature); } NotificationRequestSignatureVerifier(String secretKey);  NotificationRequestSignatureVerifier(String secretKey, SignatureAlgorithm signatureAlgorithm); boolean verifySignature(String body, String timestamp, String signature); boolean verifySignature(String body, String timestamp, String signature, long secondsValidFor); }
NotificationRequestSignatureVerifier { public boolean verifySignature(String body, String timestamp, String signature) { return signedPayloadValidator.validateSignedPayload( emptyIfNull(body) + emptyIfNull(timestamp), signature); } NotificationRequestSignatureVerifier(String secretKey);  NotificationRequestSignatureVerifier(String secretKey, SignatureAlgorithm signatureAlgorithm); boolean verifySignature(String body, String timestamp, String signature); boolean verifySignature(String body, String timestamp, String signature, long secondsValidFor);  }