def buildSignature(date, contentLength, method, contentType, resource):
        """
        Function to build signature for Authorization for Log Analytics Workspace
        :param date: current time in UTC
        :param contentLength: length of content
        :param method: http method (POST)
        :param contentType: type of content in payload(application/json)
        :param resource: endpoint for messages to be posted
        :return: computed authorization key
        """
        xHeaders = 'x-ms-date:' + date
        stringToHash = method + "\n" + str(contentLength) + "\n" + contentType + "\n" + xHeaders + "\n" + resource
        bytesToHash = bytes(stringToHash, encoding="utf-8")
        decodedKey = base64.b64decode(WORKSPACESHAREDKEY)
        encodedHash = base64.b64encode(hmac.new(decodedKey, bytesToHash, digestmod=hashlib.sha256).digest()).decode()
        authorization = "SharedKey {}:{}".format(WORKSPACEID, encodedHash)
        return authorization

        Function to build signature for Authorization for Log Analytics Workspace
        :param date: current time in UTC
        :param contentLength: length of content
        :param method: http method (POST)
        :param contentType: type of content in payload(application/json)
        :param resource: endpoint for messages to be posted
        :return: computed authorization key
        
Solutions/Cisco ETD/Data Connectors/CiscoETDAzureSentinelConnector/__init__.py