VERSION | = | "0.9.17" |
Builds the canonical string for signing requests. This strips out all ’&’, ’?’, and ’=’ from the query string to be signed. The parameters in the path passed in must already be sorted in case-insensitive alphabetical order and must not be url encoded.
@param [String] params the params that will be sorted and encoded as a canonical string. @param [String] host the hostname of the API endpoint. @param [String] method the HTTP method that will be used to submit the params. @param [String] base the URI path that this information will be submitted to. @return [String] the canonical request description string.
Encodes the given string with the secret_access_key by taking the hmac-sha1 sum, and then base64 encoding it. Optionally, it will also url encode the result of that to protect the string if it‘s going to be used as a query string parameter.
@param [String] secret_access_key the user‘s secret access key for signing. @param [String] str the string to be hashed and encoded. @param [Boolean] urlencode whether or not to url encode the result., true or false @return [String] the signed and encoded string.