BCrypt library for .net Core

I’m really excited about  .net Core. A fully cross-platform, managed environment that lets us use the brilliant .net ecosystem. Well, mostly.

Unfortunately, the downside of a complete rewrite is that a lot of existing libraries need to be ported to use it. One of the libraries I was keen to use with an upcoming ASP.net Core project is BCrypt.net – unfortunately, the maintainer of the project hasn’t made any updates to it in several years, so it seems unlikely that he’s going to release a .net port.

I decided that someone should port it. The source code was available, it’s using the BSD License so there’s no excuse really. Someone should get on that.

Then I decided that I’m someone.

Despite having never ported anything to .net core before, nor having released anything on Nuget, it only took me a couple of hours to figure out the details. If you’re interested, the Nuget package is here and the source code is available on github.

Many thanks to the original author for writing BCrypt.net in the first place.

  • Michael Sienknecht

    Thank you. Made my Job a lot easier

  • Hardy Wang

    Thanks for your work. In the original bcrypt project repo, several people reported some issue and fix, but they were never merged into the main branch.

    Would you also plan to take care that part?

    • Sure, can you link me to the issues? I’ll take a look and see what I can do.

      • Hardy Wang
        • Okay, I’ve had a look at them. The side channel fix should be trivial to merge so that’s no problem. The others are a little bit more involved but when I have time, I will attempt to fix them on the github repo I made.

  • markentingh

    I am developing a purely DNXCore50 project and when I add “BCrypt.Net-Core”: “1.1.0” to my project.json, Visual Studio 2015 tells me it does not support DNXCore,Version=v5.0

    • Why are you making a dnxcore project? Dnx was deprecated before the final release of .net core, you should be using the RTM bits and building netcoreapp applications. If you absolutely must use dnxcore for some reason (and you should not be! You don’t have any support from Microsoft for Dnx), you can try the 1.0 release of this library that targeted dnxcore.

      • markentingh

        yea I apologize I’ve been working on this project since beta4 and its a bit hard to keep up with all the changes

  • Bronley Plumb

    Thanks for taking the time to do this!