简体   繁体   中英

blob to NSstring or NSData

I m new to IPhone Application development. Actually, I converted UIImage to BASE64 String and sent to server side. It was about 58000 character length. They, stored as Blob,now it is 5 to 6 character length. They are giving this 5 charecter blob data.

So, How can i reconstructed this blob to string ,which i sent?

Please reply.

Have you tried this:

NSData *cont=[[NSData alloc]initWithBytes:[blob_data bytes] length:[blob_data length]];

and then convert data into NSString using NSString initWithData .

I will suggest you to do encryption AES 128 and after that compression gzip in order to reduce the bandwidth wastage. Also it also make your data secure.At the server side do this in reverse order you will get origional plain data.

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