ios - AFNetWorking参数加密
ringa_lee
ringa_lee 2017-04-17 17:34:03
0
1
469

AFNetWorking如何在发送数据之前拿到转为json的参数 对他进行加密?

ringa_lee
ringa_lee

ringa_lee

reply all(1)
阿神

I think the first choice for encryption is https, so that you can encrypt the body without manually writing the encryption algorithm.

If you must encrypt according to your own protocol, you can

NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] requestWithMethod: URLString: parameters: error:];

In this way, we first get the request, and then get request.HTTPBody. After the encryption is completed,

AFHTTPRequestOperation *operation = [manager HTTPRequestOperationWithRequest:request success:nil failure:nil];

Send it out again...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template