def __init__(self, username, password, domain=None, workstation=None,<EOL>cbt_data=None, ntlm_compatibility=<NUM_LIT:3>):
self.username = username<EOL>self.password = password<EOL>self.domain = domain<EOL>self.workstation = workstation<EOL>self.cbt_data = cbt_data<EOL>self._server_certificate_hash = None  <EOL>self.ntlm_compatibility = ntlm_compatibility<EOL>self.complete = False<EOL>self.negotiate_flags = NegotiateFlags.NTLMSSP_NEGOTIATE_TARGET_INFO |NegotiateFlags.NTLMSSP_NEGOTIATE_128 |NegotiateFlags.NTLMSSP_NEGOTIATE_56 |NegotiateFlags.NTLMSSP_NEGOTIATE_UNICODE |NegotiateFlags.NTLMSSP_NEGOTIATE_VERSION |NegotiateFlags.NTLMSSP_NEGOTIATE_KEY_EXCH |NegotiateFlags.NTLMSSP_NEGOTIATE_ALWAYS_SIGN |NegotiateFlags.NTLMSSP_NEGOTIATE_SIGN |NegotiateFlags.NTLMSSP_NEGOTIATE_SEAL<EOL>self._set_ntlm_compatibility_flags(self.ntlm_compatibility)<EOL>self._negotiate_message = None<EOL>self._challenge_message = None<EOL>self._authenticate_message = None<EOL>self._session_security = None<EOL>
r"""
        Initialises a NTLM context to use when authenticating using the NTLM
        protocol.
        Initialises the NTLM context to use when sending and receiving messages
        to and from the server. You should be using this object as it supports
        NTLMv2 authenticate and it easier to use than before. It also brings in
        the ability to use signing and sealing with session_security and
        generate a MIC structure.

        :param username: The username to authenticate with
        :param password: The password for the username
        :param domain: The domain part of the username (None if n/a)
        :param workstation: The localworkstation (None if n/a)
        :param cbt_data: A GssChannelBindingsStruct or None to bind channel
            data with the auth process
        :param ntlm_compatibility: (Default 3)
            The Lan Manager Compatibility Level to use with the auth message
            This is set by an Administrator in the registry key
            'HKLM\SYSTEM\CurrentControlSet\Control\Lsa\LmCompatibilityLevel'
            The values correspond to the following;
                0 : LM and NTLMv1
                1 : LM, NTLMv1 and NTLMv1 with Extended Session Security
                2 : NTLMv1 and NTLMv1 with Extended Session Security
                3-5 : NTLMv2 Only
            Note: Values 3 to 5 are no different from a client perspective