code: def get_request_authorization(method, resource, key, params, headers):
          
          if not key:
              return six.b('')
          content = method + "\n"
          if 'Content-MD5' in headers:
              content += headers['Content-MD5']
          content += '\n'
          if 'Content-Type' in headers:
              content += headers['Content-Type']
          content += "\n"
          content += headers['Date'] + "\n"
          content += Util.canonicalized_log_headers(headers)
          content += Util.canonicalized_resource(resource, params)
          return Util.hmac_sha1(content, key)
docs: :return bytes (PY2) or string (PY2)