objC wrapper for openSSL on iPhone

You need openSSL in your iPhone app? Using  C# is a lot of work, but luckily the guys at Septicus Software made a nice wrapper for it, called SSCrypto.

provides a simple wrapper around OpenSSL library functions for encryption, decryption (both symmetric and RSA) and checksums. It also encodes and decodes base64 data and can generate both private and public RSA keys.

I’ve  prepared the wrapper for easy use in iPhone Apps. Download it from here.

usage:

-add the *.a files to frameworks
-add the openssl headers to your project
-add the SSCrypto.h and .m to your project

if you want to build your project for simulator and iPhone I suggest having 2 targets, one for the Simulator (linked with the *i386.a files) and one for the iPhone (linked with the *arm.a files)

Check out the readme.txt for examples.

SSCrypto is under the BSD Style License, so you can use it for free in commercial apps without telling anyone about it.

  1. Thanks for sharing this! A quick tip if you want to create a “fat” lib that has both the arm/386 code in it is to use lipo:

    lipo -output libcrypto.a -create libcrypto_i386.a libcrypto_arm.a

    XCode knows which architecture to use based on the configuration that’s selected.

    • asdf
    • August 30th, 2010

    Thanks a lot.

  1. No trackbacks yet.