iOS:NSURLAuthenticationChallenge是否通过网络发送加密凭据?

iOS:NSURLAuthenticationChallenge是否通过网络发送加密凭据?,ios,sharepoint,encryption,ntlm,nsurlcredential,Ios,Sharepoint,Encryption,Ntlm,Nsurlcredential,我的iOS应用程序正在连接到Sharepoint web服务,Sharepoint用于NTLM身份验证 在我这边,我实现了以下NTLM身份验证代码: - (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { if ([challenge previousFailureCount] == 0)

我的iOS应用程序正在连接到Sharepoint web服务,Sharepoint用于NTLM身份验证

在我这边,我实现了以下NTLM身份验证代码:

- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
{
    if ([challenge previousFailureCount] == 0)
    {
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    NSString *username = [userDefaults valueForKey:KEY_USERNAME];
    NSString *password = [userDefaults valueForKey:KEY_PASSWORD];

    NSURLCredential *newCredential;
    newCredential = [NSURLCredential credentialWithUser:username password:password persistence:NSURLCredentialPersistenceNone];
    [[challenge sender] useCredential:newCredential forAuthenticationChallenge:challenge];
} else {
    [[challenge sender] cancelAuthenticationChallenge:challenge];
}}
所以我的问题是

  • 发送上述代码的用户名和密码位于 加密表格
  • 如果用户名和密码处于加密模式,那么如何 NSURLAuthenticationChallenge正在加密它们

提前感谢

我相信凭证是否加密取决于您与服务器通信时使用的协议。例如,如果您使用的是HTTPS,则凭据将使用HTTPS加密,但如果您使用的是纯HTTP,则凭据将不加密