// confidentiality, session security and 128-bit encryption while creating TYpe3Message
// object.as the immediate lines of code below to this constructor set all these required flags, passing 0 as a parameter/falg to create
// Type3Message object is valid. Please refer the below URL for more details.
// http://code.google.com/p/google-enterprise-connector-sharepoint/issues/detail?id=63
Type3Message t3m = new Type3Message(t2m, password, domain, username, host, 0);
t3m.setFlag(NtlmSsp.NTLMSSP_NEGOTIATE_SIGN,true);
t3m.setFlag(NtlmSsp.NTLMSSP_NEGOTIATE_SEAL,true);
t3m.setFlag(NtlmSsp.NTLMSSP_NEGOTIATE_NTLM2,true);
t3m.setFlag(NtlmSsp.NTLMSSP_NEGOTIATE_128,true);
return EncodingUtil.getAsciiString(Base64.encodeBase64(t3m.toByteArray()));
}catch(IOException e)
{
throw new AuthenticationException(e.getMessage());
}
}