iOS中没有bcrypt实现...可以使用其他语言创建静态库吗? [英] No bcrypt implementation in iOS... can use other language, create static library?
问题描述
没有直接的bCrypt( http://codahale.com/如何在Objective-C中安全地存储密码()的实现,尽管有C代码可以完成此操作,但它是专门针对x86处理器的,它依赖于BSD库.
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.
我正在构建一个iOS应用程序,该应用程序与相应的Online(.NET和HTML5 + Javascript)应用程序共享相同的密码哈希.
I'm building an iOS app which shares the same password hashes as corresponding Online (.NET and HTML5+Javascript) applications.
我不应该去哪里,我可以在那儿阅读非常简单的Java代码( http://www.mindrot.org/projects/jBCrypt/)并将其翻译为适用于iOS开发的Objective-C代码.
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.
但是,有一个Ruby实现( https://github.com/codahale/bcrypt-ruby ),我听说您可以使用Ruby来构建iOS应用程序.然后,我可以将Ruby代码汇总到静态库中,并将其链接到我的iOS项目吗?或者,甚至使用Mono并利用.NET实现(也是一个纯净的,无依赖的项目)来构建静态库?
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?
或者,最后,有人知道bCrypt代码的Objective-C实现吗?看起来很简单,我只是对.NET/C#/Ruby不够了解,无法自己翻译.
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.
推荐答案
我最近开源了自己的BCrypt Objective C实现.我也寻找现有的Objective C实现,但无济于事.因此,我改为从Java移植了一个!
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.
您可以在这里找到它...
http://www.jayfuerstenberg.com/blog/bcrypt-in -objective-c https://github.com/jayfuerstenberg/JFCommon
You can find it here...
http://www.jayfuerstenberg.com/blog/bcrypt-in-objective-c https://github.com/jayfuerstenberg/JFCommon
这篇关于iOS中没有bcrypt实现...可以使用其他语言创建静态库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!