• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
HTTP Digest authentication in Objective -C using byte array as password
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: HTTP Digest authentication in Objective -C using byte array as password
      • From: Quinn <email@hidden>
    • Re: HTTP Digest authentication in Objective -C using byte array as password
      • From: Mark Pauley <email@hidden>
  • Prev by Date: Soap Response Delay [SOLVED]
  • Next by Date: Re: HTTP Digest authentication in Objective -C using byte array as password
  • Previous by thread: Soap Response Delay [SOLVED]
  • Next by thread: Re: HTTP Digest authentication in Objective -C using byte array as password
  • Index(es):
    • Date
    • Thread