openSSL commands in the iPhone SDK... how?

I can easily use the terminal to encrypt a string via openSSL commands, using a CER file and a TXT file to start from. I have to do it the same in the iPhone SDK.

Around there are excellent tutorials on how to compile openSSL for iPhone SDK. But then I'm missing the next step.

How to have in a iPhone .m the following command, for example?

openssl rsautl -encrypt -in TEXT.txt -out ENCRYPTED.enc -inkey CERTIFICATE.cer -certin -pkcs

I'm sorry if this question may sound stupid, but I really don't know how to start... Is there a tutorial or a sample around?

Thanks a lot!


OpenSSL isn't pre-built for iOS. Perhaps use Jens Alfke's MYCrypto framework, instead. This adds wrappers around Apple's Keychain and CommonCrypto components. You can use this, for example, to help you set up certificates and to perform public and private key-based encryption.

链接地址: http://www.djcxy.com/p/63478.html

上一篇: OpenSSL作为CA而不涉及certs / crl / index / etc环境

下一篇: iPhone SDK中的openSSL命令...怎么样?