protected String stringToSign(SortedMap<String, String> signables) {
        // each key and value is followed by a newline
        StringBuilder sb = new StringBuilder();
        for(String k: signables.keySet()){
            sb.append(k).append("\n");
            sb.append(signables.get(k)).append("\n");
        }
        String result = sb.toString();
        return result;
    }
Does the actual Java cryptographic verification of the signature. This
method does no handling of the many rare exceptions it is required to
catch.

This can also be used to verify the signature from the x-amz-sns-signature http header

@param message
           Exact string that was signed.  In the case of the x-amz-sns-signature header the
           signing string is the entire post body
@param signature
           Base64-encoded signature of the message
@return
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/util/SignatureChecker.java