Reputation: 3379
I need to send encrypted data to a remote server from Objective-C using a web service. What encryption method should I use? It should support both Objective-C and the remote server.
Upvotes: 1
Views: 1372
Reputation: 53669
CommonCryptor.h is the header for C encryption on iPhone. It supports the following algorithms:
kCCAlgorithmAES128,
kCCAlgorithmDES,
kCCAlgorithm3DES,
kCCAlgorithmCAST,
kCCAlgorithmRC4
If you are on MacOS you have CommonCrypto plus all the OpenSSL options. I do not know of an Objective-C wrapper for these classes, but CommonCrypto is fairly simple as encryption goes.
Those algorithms are all common enough that you should not have any trouble finding an implementation, regardless of the server platform. If you have no compelling reason to choose another algorithm, AES is a reasonable pick.
Edit:
An answer to this similar question suggested SSCrypto as an Objective-C wrapper for OpenSSL.
Upvotes: 2