开发者

How to make an NSURLRequest login NOT in plain text

Whats the best way to make this a more secure and less obvious security risk?

NSString *loginIdentification = [NSString stringWithFormat:@"user=%@&pass=%@&", userNameLogin, passWordLogin];

    addressVariable = [NSString stringWithFormat:@"%@/%@", url, loginIdentification];
    addressVariable =  [addressVariable stringByAddingPercentEscapesUsingE开发者_StackOverflow社区ncoding: NSUTF8StringEncoding];

    NSURLResponse* response = nil;
    NSError* error = nil;
    NSData* data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];


Make sure you're using an https connection and not an http connection.


Instead of putting the sensitive information in the URL (via GET), use the POST method and put them in the body. That way, they won't show up in your server logs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜