There is no straight forward bCrypt ( http://codahale.com/how-to-safely-store-a-password/) implementation in Objective-C, and while there are C code that does accomplish this, it’s specifically for x86 processors, relying on BSD libraries.
I’m building an iOS app which shares the same password hashes as corresponding Online (.NET and HTML5+Javascript) applications.
I’m not quite where I ought to be, where I can read the awfully simplistic Java code ( http://www.mindrot.org/projects/jBCrypt/) and translate it to Objective-C code, suitable for iOS development.
However, there is a Ruby implementation ( https://github.com/codahale/bcrypt-ruby), and I’ve heard that you can use Ruby to build iOS applications. Could I then roll the Ruby code up into a Static Library, and link it to my iOS projects? Or, even use Mono and utilize the .NET implementation (also a clean, pure-code, no-dependency project) to build a Static Library?
Or, finally, does anyone know of an Objective-C implementation of the bCrypt code? It seems simple enough, I just don’t know enough about .NET/C#/Ruby to translate it myself.
I have recently open sourced my own BCrypt Objective C implementation. I too looked for an existing Objective C implementation but to no avail. So I ported one from Java instead!
It does not have any external library or framework dependencies so it might be the perfect fit for you.
You can find it here…
http://www.jayfuerstenberg.com/blog/bcrypt-in-objective-chttps://github.com/jayfuerstenberg/JFCommon