Bitwarden.Server.Sdk.PasswordHashing
0.1.0
Prefix Reserved
dotnet add package Bitwarden.Server.Sdk.PasswordHashing --version 0.1.0
NuGet\Install-Package Bitwarden.Server.Sdk.PasswordHashing -Version 0.1.0
<PackageReference Include="Bitwarden.Server.Sdk.PasswordHashing" Version="0.1.0" />
<PackageVersion Include="Bitwarden.Server.Sdk.PasswordHashing" Version="0.1.0" />
<PackageReference Include="Bitwarden.Server.Sdk.PasswordHashing" />
paket add Bitwarden.Server.Sdk.PasswordHashing --version 0.1.0
#r "nuget: Bitwarden.Server.Sdk.PasswordHashing, 0.1.0"
#:package Bitwarden.Server.Sdk.PasswordHashing@0.1.0
#addin nuget:?package=Bitwarden.Server.Sdk.PasswordHashing&version=0.1.0
#tool nuget:?package=Bitwarden.Server.Sdk.PasswordHashing&version=0.1.0
Bitwarden.Server.Sdk.PasswordHashing
About
Hashes a password hash a client derived (a master password hash or a Send password hash) before a service stores it, and checks a client's hash against the stored one. Hashes are compatible with those the Bitwarden server stores: either side verifies the other's.
Installing
dotnet add package Bitwarden.Server.Sdk.PasswordHashing
Usage
services.AddServerPasswordHasher();
Wrap what the client sent in ClientCreatedHash and store the ServerStorableHash it returns. The
wrappers keep the two from being swapped, and their ToString hides the value:
var clientHash = new ClientCreatedHash(request.MasterPasswordHash);
user.MasterPassword = hasher.CreateStoredHash(clientHash).Value;
Check it, and replace a hash stored with older parameters:
var clientHash = new ClientCreatedHash(request.MasterPasswordHash);
var result = hasher.VerifyStoredHash(new ServerStorableHash(user.MasterPassword), clientHash);
if (result == PasswordHashVerification.SuccessRehashNeeded)
{
user.MasterPassword = hasher.CreateStoredHash(clientHash).Value;
}
return result != PasswordHashVerification.Failed;
Algorithm
ASP.NET Core Identity's V3 format: PBKDF2-HMAC-SHA512, 100,000 iterations, 128-bit random salt,
256-bit subkey. A host's own PasswordHasherOptions do not change it.
| 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Identity.Core (>= 10.0.14)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 30,489 | 11/16/2026 |