HTTP Digest authentication in Objective -C using byte array as password
HTTP Digest authentication in Objective -C using byte array as password
- Subject: HTTP Digest authentication in Objective -C using byte array as password
- From: Shohel Ahmed <email@hidden>
- Date: Thu, 18 Mar 2010 12:31:06 -0700 (PDT)
Hi,
i am using asynchronous URL connection to access a resource from server which uses HTTP digest authentication. In my
(void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
delegate method i have the following code
newCredential=[NSURLCredential credentialWithUser: username password: pass persistence:NSURLCredentialPersistenceNone];
[[challenge sender] useCredential:newCredential
forAuthenticationChallenge:challenge];
The default password parameter in NSURLCredential is in NSString format. However, i have a password which is in byte array format. The byte array contains non-ascii code. How can i use this byte array password in NSString format for this purpose. I have tried with NSISOLatin1StringEncoding format. But the digest response i got is not correct using this format.
So i am facing difficulty to choose the encoding format for converting byte array to NSString format in this particular case. Any ideas!
BR//shohel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden