Objective-C library recommendation for AES-256 in CTR mode

◇◆丶佛笑我妖孽 提交于 2019-12-12 01:18:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!