Open TaborKelly opened 5 years ago
Agreed!
Note that CommonCrypto doesn't seem to have a bcrypt implementation, which may make this impossible as we don't provide crypto in this library - just APIs on top.
That’s correct. That’s why I didn’t do an implementation before. Somebody was working on an implementation that could be integrated awhile back but never submitted a PR for it. I’ll take a look and see what it would take. There’s bound to be an open source implementation around that's of proper quality that it could be modified and integrated into the library. I found one earlier but it was way too bloated and other commitments sidetracked me and I never got back to it. Any suggestions of a good, lean implementation that might used? Even one in C would be fine if self contained, I could port it over to Swift rather quickly.
I concur. I erroneously though that CommonCrypto exposed EksBlowfishSetup()
, but it doesn't as far as I can tell. I threw this together over the weekend and you are welcome to use it, but I'm not sure if it meets your IP requirements or not:
https://github.com/TaborKelly/Bcrypt
Thank you for linking but I'm afraid we couldn't take a pure Swift implementation. This project does not embed crypto itself, so we couldn't integrate C code either. What we could do is have API which delegated to OpenSSL on Linux, and was non-functional on Darwin.
A ready to go bcrypt implementation would be a very nice thing to have.