parameters: (self, cred)
return_statement: return sign
docstring: Sign the request with credentials *cred*.
docstring_summary: Sign the request with credentials *cred*.
docstring_tokens: Sign the request with credentials * cred * .
function: def sign(self, cred):
          "Sign the request with credentials *cred*."
          desc = self.descriptor()
          key = cred.secret_key.encode("utf-8")
          hasher = hmac.new(key, desc.encode("utf-8"), hashlib.sha1)
          sign = b64encode(hasher.digest())
          self.headers["Authorization"] = "AWS %s:%s" % (cred.access_key, sign)
          return sign
function_tokens: def sign ( self , cred ) : desc = self . descriptor ( ) key = cred . secret_key . encode ( "utf-8" ) hasher = hmac . new ( key , desc . encode ( "utf-8" ) , hashlib . sha1 ) sign = b64encode ( hasher . digest ( ) ) self . headers [ "Authorization" ] = "AWS %s:%s" % ( cred . access_key , sign ) return sign