Hashing Passwords using BCrypt in ASP.Net Core (.NET 5)

Photo by Jason Dent on Unsplash

A quick and simple tutorial on hashing passwords using Bcrypt.

This requires the BCrypt.Net-Next NuGet package
Quick code example:

EncryptionHelper.cs (Example)

Quick code example:

Which results in the following console output when inserting a new user.

And that’s all there is to it. Hope you’ve learned something.

Thanks for reading.