1

Are there any ready-to-use encryption libraries for the iPhone? 3DES, AES/Rijndael, whatever. I need to encrypt and decrypt strings. My understanding of Objective-C is that you can use C code inside of Objective-C methods/functions/whatever they're called.

whitebreadb
  • 525
  • 2
  • 6
  • 6

4 Answers4

4

iPhone comes out of the box with the CommonCrypto library. It has various support for encryption. See the Security Coding How-to from Apple.

fishinear
  • 6,101
  • 3
  • 36
  • 84
  • 2
    Yeah, I would go with the Apple-supplied libraries. See http://developer.apple.com/library/ios/#documentation/Security/Conceptual/cryptoservices/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011172 – jsd Feb 01 '12 at 18:51
1

That is correct, you can use any C code you want in Objective - C, since it is a proper superset of C.

Oscar Gomez
  • 18,436
  • 13
  • 85
  • 118
0

don't forget you could always use c++ source code in your obj-c project and there are many c++ encryption libraries like : LibTomCrypt

add c++ code to your project and simply call functions;

Duke
  • 1,731
  • 2
  • 17
  • 33
0

Take a look at http://www.example-code.com/objc/crypt2_3des.asp

Maysam
  • 7,246
  • 13
  • 68
  • 106