@Test public void testVerifySignatureSHA256() { ApiResponseSignatureVerifier verifier = new ApiResponseSignatureVerifier("X7qLTrsES31MzxxkxPPA-pAGGfU", SignatureAlgorithm.SHA256); boolean actual = verifier.verifySignature("tests/logo.png", "1", "cc69ae4ed73303fbf4a55f2ae5fc7e34ad3a5c387724bfcde447a2957cacdfea"); assertTrue(actual); }
public boolean verifySignature(String publicId, String version, String signature) { return Util.produceSignature(ObjectUtils.asMap( "public_id", emptyIfNull(publicId), "version", emptyIfNull(version)), secretKey, signatureAlgorithm).equals(signature); }
ApiResponseSignatureVerifier { public boolean verifySignature(String publicId, String version, String signature) { return Util.produceSignature(ObjectUtils.asMap( "public_id", emptyIfNull(publicId), "version", emptyIfNull(version)), secretKey, signatureAlgorithm).equals(signature); } }
ApiResponseSignatureVerifier { public boolean verifySignature(String publicId, String version, String signature) { return Util.produceSignature(ObjectUtils.asMap( "public_id", emptyIfNull(publicId), "version", emptyIfNull(version)), secretKey, signatureAlgorithm).equals(signature); } ApiResponseSignatureVerifier(String secretKey);  ApiResponseSignatureVerifier(String secretKey, SignatureAlgorithm signatureAlgorithm); }
ApiResponseSignatureVerifier { public boolean verifySignature(String publicId, String version, String signature) { return Util.produceSignature(ObjectUtils.asMap( "public_id", emptyIfNull(publicId), "version", emptyIfNull(version)), secretKey, signatureAlgorithm).equals(signature); } ApiResponseSignatureVerifier(String secretKey);  ApiResponseSignatureVerifier(String secretKey, SignatureAlgorithm signatureAlgorithm); boolean verifySignature(String publicId, String version, String signature); }
ApiResponseSignatureVerifier { public boolean verifySignature(String publicId, String version, String signature) { return Util.produceSignature(ObjectUtils.asMap( "public_id", emptyIfNull(publicId), "version", emptyIfNull(version)), secretKey, signatureAlgorithm).equals(signature); } ApiResponseSignatureVerifier(String secretKey);  ApiResponseSignatureVerifier(String secretKey, SignatureAlgorithm signatureAlgorithm); boolean verifySignature(String publicId, String version, String signature);  }