def digest(self, method, node):
        """
        Returns the digest of an object from a method name
        :param method: hash method
        :type method: str
        :param node: Object to hash
        :type node: str
        :return: hash result
        """
        if method not in constants.TransformUsageDigestMethod:
            raise Exception('Method not allowed')
        lib = hashlib.new(constants.TransformUsageDigestMethod[method])
        lib.update(node)
        return base64.b64encode(lib.digest())
def digest ( self , method , node ) : if method not in constants . TransformUsageDigestMethod : raise Exception ( 'Method not allowed' ) lib = hashlib . new ( constants . TransformUsageDigestMethod [ method ] ) lib . update ( node ) return base64 . b64encode ( lib . digest ( ) )
Returns the digest of an object from a method name
        :param method: hash method
        :type method: str
        :param node: Object to hash
        :type node: str
        :return: hash result