I have compiled and built openssl to my iOS project,
but struggling in objective-c with writing an equivalent code to this command line:
openssl rsautl -encrypt -inkey publicKey.pem -pubin -in textfile.txt -out encrypted.bin
How can I achieve this?
So I resolved my problem, here is the function to my question that encrypts an NSString:
I modified the code from the code in this question: send RSA public key to iphone and use it to encrypt
(Also at the end of my code I use QSUtilities to encode the message in base64)