#NEWLINE# def _getAuthorization( self , method , content_hash , content_type , headers , resource ) : #NEWLINE# #INDENT# '\n        Create authentication headers.\n       \n        **Arguments:**\n         * *method* -- HTTP method of the request\n         * *parameters* -- Key value pairs of parameters\n       \n        **Returns:**\n         * A dictionary of authorization parameters\n        ' #NEWLINE# date = time . strftime ( '%a, %d %b %Y %H:%M:%S +0000' , time . gmtime ( ) ) #NEWLINE# amazon_headers = self . _canonicalize ( headers ) #NEWLINE# if len ( amazon_headers ) : #NEWLINE# #INDENT# data = ( '%s\n%s\n%s\n%s\n%s\n%s' % ( method , content_hash , content_type , date , amazon_headers , resource ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# data = ( '%s\n%s\n%s\n%s\n%s%s' % ( method , content_hash , content_type , date , amazon_headers , resource ) ) #NEWLINE# #UNINDENT# args = [ self . aws_secret_access_key , data , hashlib . sha1 ] #NEWLINE# signature = base64 . encodestring ( hmac . new ( * args ) . digest ( ) ) . strip ( ) #NEWLINE# authorization = ( 'AWS %s:%s' % ( self . aws_access_key_id , signature ) ) #NEWLINE# return { #NEWLINE# #INDENT# 'Authorization' : authorization , #NEWLINE# 'Date' : date , #NEWLINE# 'Host' : self . host , #NEWLINE# #UNINDENT# }