views:

51

answers:

2

Does ASIHTTPRequest uses Base64 encoding for username and password? On the webpage I only found out that the username/password is in plain text if SSL is not used.

A: 

ASIHTTPRequest uses encoding, if you have not specified anything default will be NSISOLatin1StringEncoding. I am sure it supports NSUTF8StringEncoding.

KiranThorat
I'm not sure if we are talking about the same things. The question deals with the authentication header. Normally, the username:password string is converted to Base64 encoding when sending the HTTP response. See [here](http://en.wikipedia.org/wiki/Base64). I think it follow the standard, but was not quite sure about it. Therefore the question.
testing
A: 

Basic authentication always uses base64 encoding, and hence ASIHTTPRequest using base64 for basic authentication.

This is often described as passing the username/password in "plain text" as base64 is trivial to decode.

If you use basic authentication over https, then the base64 part containing the username/password is passed over the encrypted https connection, so is no longer in "plain text".

JosephH
That is what I wanted to know. Thanks!
testing