AES128 encoding in iOS4+

谁说我不能喝 提交于 2019-12-23 12:08:31

问题


I'm new to encrypting in iOS and i'm stuck with AES128 encryption. Is there some pre-built library (perhaps OpenSSL) which i can use easily?

If so, how do I implement it and use it? Are there tutorials?

I've found several "easy" tutorials how to build OpenSSL and import it to Xcode, but none of them worked for me. Also, it needs to be compatible with iOS4, so solution via CommonCrypto doesn't seem to be a solution (since several essential methods are only iOS 5+ compatible).

Thanks for any kind of help, i'm pulling my hair out over this :)


回答1:


This is written in Obj-C and allows for AES128 encryption of NSString and NSData.

I take it back. It uses CommonCrypt.




回答2:


If anyone is still interested in this question i found a solution on http://dotmac.rationalmind.net/2009/02/aes-interoperability-between-net-and-iphone/ . On this page you can download very simple obj-c classes which are compatible with iOS4 and doesn't need any 3rd party libraries.



来源:https://stackoverflow.com/questions/10237654/aes128-encoding-in-ios4

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