简体   繁体   中英

ASIHTTPRequest: Basic Authentication with Base64 encoding?

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.

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".

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM