(self, cred)
return sign
Sign the request with credentials *cred*.
Sign the request with credentials *cred*.
Sign the request with credentials * cred * .
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
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