如何为iOS 4编译和使用CommonCrypto? [英] How to compile and use CommonCrypto for iOS 4?

查看:92
本文介绍了如何为iOS 4编译和使用CommonCrypto?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于CCKeyDerivationPBKDF在iOS 5.0之后才可用,因此人们建议使用可在此处使用的CommonCrypto开源代码:

Since CCKeyDerivationPBKDF is not available until after iOS 5.0, people have suggested using the open source code for CommonCrypto available here:

http://www.opensource.apple.com/source/CommonCrypto/CommonCrypto-55010/

我的问题是-如何在现有项目中使用此开源代码?我们应该创建dylib并以某种方式将其包含在项目中还是获取源代码文件并将其添加到现有项目中?您如何在Xcode中做到这一点?您如何确保在iOS 4设备/模拟器上运行时能找到该功能?

My question is - how does one use this open source code in an existing project? Should we create dylib and somehow include it in the project or take the source code files and add them to the existing project? How do you do it in Xcode? How do you make sure that at run-time on iOS 4 device/simulator, it finds the function?

谢谢.

推荐答案

我必须在Xcode项目中包含CommonKeyDerivation.c,CommonKeyDerivation.h,CommonKeyDerivationPriv.h,但这已经足够了–因为它似乎还有其他支持/基础功能CCKeyDerivationPBKDF所需的内容已包含在iOS4 CommonCrypto中.

I had to include CommonKeyDerivation.c, CommonKeyDerivation.h, CommonKeyDerivationPriv.h in my Xcode project, but that was enough – because it seems other supporting/underlying functions needed by CCKeyDerivationPBKDF are already included in iOS4 CommonCrypto.

这篇关于如何为iOS 4编译和使用CommonCrypto?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆