Xcode Openssl RSA decryption function needed
===

I am reading an encrypted string from an application in xcode and I have to write a function that uses RSA decryption to decode and display the message.

I am completely lost on where to begin with this.

I have Openssl complied in xcode and I am using the openssl/rsa.h file.

I am trying to use the function:

    RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to, RSA *rsa, int padding);

But then I'd read somewhere on the Openssl main site that the function just returns a number and not the actual string. I also have no idea what paramenters to pass through.

The only reference I have found is the openssl/rsa.h file and looking at the functions it contains.

I've tried doing some research the past couple hours but I have no found any answers.

I was wondering if there is a simple function that I can pass my encrypted string and my private key (using a file or hardcoded) and it can return the decrypted string?

If not is there a guide on how to use Openssl with Objective C programming?

Please let me know if you need more information on the issue.

Thank you in advance.
