ideawu / Objective-C-RSA

Doing RSA encryption and decryption with Objective-C on iOS
http://www.ideawu.com/blog/post/132.html
Other
1.15k stars 280 forks source link

Decrypt pdf file with public key on iOS #25

Open bechirghodbane opened 8 years ago

bechirghodbane commented 8 years ago

Hello, I want to encrypt a pdf file with public key before sending it to the server where i can decrypt it with a private key. Before that, I was using the demo application on ios and I was trying to read pdf file as NSData then generate the encrytion and decryption result in order to validate the output of the hole process , in other words , I wanted to check if the output file after the encrytion and decryption is still a valid pdf file like the original one. Unfortenetly , it seems that the output file is corrupted since I get this error when I tried to show the final pdf file on a webview .

failed to find `endstream' marker; trying to recover. FlateDecode: decoding error: invalid bit length repeat.