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/
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?
Thanks.
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.