@Test public void testIsMatchWithShuffledQueryParams() { RequestSigner requestSigner = new RequestSigner(getBytes("secret")); String expectedSignature = "Tfn+nRUBsn6lQgf6IpxBMS1j9lm7XsGjt5xh47M3jCk="; Request request = new Request("1544544948", "def=bar&abc=foo", getBytes("")); assertTrue(requestSigner.isMatch(expectedSignature, request)); }
public boolean isMatch(String expectedSignature, Request request) { try { return isMatch(Base64.decode(expectedSignature), request); } catch (IOException e) { throw new RequestSigningException(e); } }
RequestSigner { public boolean isMatch(String expectedSignature, Request request) { try { return isMatch(Base64.decode(expectedSignature), request); } catch (IOException e) { throw new RequestSigningException(e); } } }
RequestSigner { public boolean isMatch(String expectedSignature, Request request) { try { return isMatch(Base64.decode(expectedSignature), request); } catch (IOException e) { throw new RequestSigningException(e); } } RequestSigner(byte[] key); }
RequestSigner { public boolean isMatch(String expectedSignature, Request request) { try { return isMatch(Base64.decode(expectedSignature), request); } catch (IOException e) { throw new RequestSigningException(e); } } RequestSigner(byte[] key); boolean isMatch(String expectedSignature, Request request); boolean isMatch(byte[] expectedSignature, Request request); }
RequestSigner { public boolean isMatch(String expectedSignature, Request request) { try { return isMatch(Base64.decode(expectedSignature), request); } catch (IOException e) { throw new RequestSigningException(e); } } RequestSigner(byte[] key); boolean isMatch(String expectedSignature, Request request); boolean isMatch(byte[] expectedSignature, Request request);  }