Meziantou.Framework.Bcrypt 2.0.1

Prefix Reserved
Suggested Alternatives

Meziantou.Framework.Hashing

There is a newer version of this package available.
See the version list below for details.
dotnet add package Meziantou.Framework.Bcrypt --version 2.0.1
                    
NuGet\Install-Package Meziantou.Framework.Bcrypt -Version 2.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Meziantou.Framework.Bcrypt" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.Framework.Bcrypt" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Meziantou.Framework.Bcrypt" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Meziantou.Framework.Bcrypt --version 2.0.1
                    
#r "nuget: Meziantou.Framework.Bcrypt, 2.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Meziantou.Framework.Bcrypt@2.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Meziantou.Framework.Bcrypt&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Meziantou.Framework.Bcrypt&version=2.0.1
                    
Install as a Cake Tool

Meziantou.Framework.Bcrypt

Helpers to hash and verify passwords using BCrypt.

var hash = Bcrypt.HashPassword("my password");
var ok = Bcrypt.Verify("my password", hash);

You can select the BCrypt revision and cost (work factor):

var hash = Bcrypt.HashPassword(
    password: "my password",
    workFactor: 12,
    version: BcryptVersion.Revision2B);

var shouldRehash = Bcrypt.NeedsRehash(hash, workFactor: 13, version: BcryptVersion.Revision2B);

Supported revisions are:

  • 2 ($2$, legacy parsing only)
  • 2a ($2a$)
  • 2b ($2b$)
  • 2x ($2x$)
  • 2y ($2y$)

BCrypt processes passwords as UTF-8 and uses at most 72 bytes.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.