问题
I'm looking for recommendations on an Objective-C library for AES-256 encryption in CTR mode. I have a database full of data encrypted with another library using CTR and seems the included CCCrypt only supports ECB or CBC with PKCS#7.
Any idea on the best portable library I should use? I'm not looking to port the original implementation as I don't have the required knowledge in cryptography and hence, that's-a-bad-idea (tm).
Thanks!
回答1:
You should be able to implement this using OpenSSL. It is not Objective C, but rather "plain" C code, but since the built-in encryption algorithms in the iPhone also rely on plain C, this should hopefully not make that big a difference.
There is a tutorial on The Rare AiR on how you can compile the OpenSSL library for iPhone.
Hope this helps, Claus
来源:https://stackoverflow.com/questions/2530746/objective-c-library-recommendation-for-aes-256-in-ctr-mode