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
https://www.nuget.org/packages/BCrypt.Net-Next/
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.

Short Coding Tutorials for .NET & NodeJS

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What a time to get into cyber security!

Try hack me got you covered!

{UPDATE} Ludo 3D Hack Free Resources Generator

Chroot: the magical healing powers of the original Linux virtualization tool

{UPDATE} Gummy Candy Maker Hack Free Resources Generator

New Malware Infects 500k Users in 3 Days

Cyber Laws in different countries

YOU CAN ONLY HUNT WHAT YOU CAN SEE: BEST NETWORK LOG SOURCES FOR THREAT HUNTING

Fuse — HackTheBox

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dominique Kleeven

Dominique Kleeven

Short Coding Tutorials for .NET & NodeJS

More from Medium

Syncfusion .NET MAUI Products: Frequently Asked Questions

Syncfusion .NET MAUI Products: Frequently Asked Questions

Attribute-Based Access Control Sample for a .Net Core API Application

EntityFramework Core 6 & PostgreSQL Date Handling

JavaScript to Xamarin.Forms Two Way Communication Setup