Fixes for issues #20, #22

This commit is contained in:
jr conlin
2014-09-28 18:12:36 -07:00
parent 73e9a0a42d
commit a56e61c442
4 changed files with 26 additions and 16 deletions
+2 -2
View File
@@ -125,7 +125,7 @@ class OAuthSimple:
'signature': self._oauthEscape(
self._parameters['oauth_signature']),
'signed_url': '%s?%s' % (self._path,
self._normalizeParameters()),
normParamString),
'header': self.getHeaderString(),
'sbs': self.sbs}
@@ -236,7 +236,7 @@ class OAuthSimple:
elif (self._parameters['oauth_signature_method'] == 'HMAC-SHA1'):
self.sbs = '&'.join([self._oauthEscape(self._action),
self._oauthEscape(self._path),
self._oauthEscape(normParamString)])
normParamString])
return base64.b64encode(hmac.new(secretKey,
self.sbs,
hashlib.sha1).digest())