Meziantou.Framework.Bcrypt
2.0.2
Prefix Reserved
See the version list below for details.
dotnet add package Meziantou.Framework.Bcrypt --version 2.0.2
NuGet\Install-Package Meziantou.Framework.Bcrypt -Version 2.0.2
<PackageReference Include="Meziantou.Framework.Bcrypt" Version="2.0.2" />
<PackageVersion Include="Meziantou.Framework.Bcrypt" Version="2.0.2" />
<PackageReference Include="Meziantou.Framework.Bcrypt" />
paket add Meziantou.Framework.Bcrypt --version 2.0.2
#r "nuget: Meziantou.Framework.Bcrypt, 2.0.2"
#:package Meziantou.Framework.Bcrypt@2.0.2
#addin nuget:?package=Meziantou.Framework.Bcrypt&version=2.0.2
#tool nuget:?package=Meziantou.Framework.Bcrypt&version=2.0.2
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$) - verified only; salts cannot be generated2a($2a$)2b($2b$) - the default2y($2y$) - identical to$2b$
$2x$ is not supported. It exists only to reproduce the crypt_blowfish sign-extension bug, which
this library does not emulate, so hashing or verifying a $2x$ hash throws NotSupportedException
rather than silently mis-verifying passwords that contain non-ASCII characters. ParseHash still
reads $2x$ hashes so you can find them in an existing database and re-hash those passwords.
BCrypt processes passwords as UTF-8 and uses at most 72 bytes.
| Product | Versions 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. |
-
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.