开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜