Description
A .net Core port of BCrypt.net
If you're working on a .net core application and need to use BCrypt to store passwords, this is a quick and dirty port of BCrypt.net.
I have tested using this library on both the full .net 4.5 framework, as well as .net core RC1.
It builds, compiles and the Unit tests pass.
It should be a drop-in replacement for BCrypt.net as the namespaces are unchanged.
BCrypt.Net-Core alternatives and similar packages
Based on the "Cryptography" category.
Alternatively, view BCrypt.Net-Core alternatives based on common mentions on social networks and blogs.
-
BouncyCastle
Together with the .Net System.Security.Cryptography, the reference implementation for cryptographic algorithms on the CLR. -
Pkcs11Interop
Managed .NET wrapper for unmanaged PKCS#11 libraries that provide access to the cryptographic hardware -
HashLib
HashLib is a collection of nearly all hash algorithms you've ever seen, it supports almost everything and is very easy to use
Pixel-Perfect Multi-Platform Applications with C# and XAML
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of BCrypt.Net-Core or a related project?
README
BCrypt.Net-Core
A .net Core port of BCrypt.net, with some feature and security enhancements.
Compatible with both the full .net framework and .net core (Netstandard 1.3).
It should be a drop-in replacement for BCrypt.net as the namespaces are unchanged.
How to use
Standard use:
// hash and save a password
hashedPassword = BCrypt.Net.BCrypt.HashPassword(clearTextPassword);
// check a password
bool validPassword = BCrypt.Net.BCrypt.Verify(userSubmittedPassword, hashedPassword);
If you need to specify a different salt revision when generating hashes, you can pass in a SaltRevision parameter:
// hash and save a password
hashedPassword = BCrypt.Net.BCrypt.HashPassword(clearTextPassword, SaltRevision.Revision2A);
This is only recommended if you're dealing with legacy systems, otherwise you should use the default of 2b. Note that the salt algorithm does not change, it will generate a correct bcrypt hash in all known cases.
Disclaimer
I did not write this library, I merely ported it to .net core. All credit goes to Ryan D. Emerle for porting BCrypt to .net in the first place.
Original Project
The original project can be found at Codeplex: https://bcrypt.codeplex.com/