

def _get_aws_auth_param(self, params, secret_key, path='/'):
    '\n        creates the signature required for AWS, per:\n\n        http://docs.amazonwebservices.com/AWSEC2/2009-04-04/DeveloperGuide/index.html?using-query-api.html#query-authentication\n\n        StringToSign = HTTPVerb + "\n" +\n                       ValueOfHostHeaderInLowercase + "\n" +\n                       HTTPRequestURI + "\n" +                 \n                       CanonicalizedQueryString <from the preceding step>\n        '
    keys = params.keys()
    keys.sort()
    pairs = []
    for key in keys:
        pairs.append(((urllib.quote(key, safe='') + '=') + urllib.quote(params[key], safe='-_~')))
    qs = '&'.join(pairs)
    string_to_sign = '\n'.join(('GET', self.host, path, qs))
    b64_hmac = base64.b64encode(hmac.new(secret_key, string_to_sign, digestmod=sha256).digest())
    return b64_hmac

dataset/ETHPy150Open infincia/AEServmon/libcloud/drivers/ec2.py EC2Connection._get_aws_auth_param/original