Soenneker.Hashing.Phc
4.0.3
Prefix Reserved
dotnet add package Soenneker.Hashing.Phc --version 4.0.3
NuGet\Install-Package Soenneker.Hashing.Phc -Version 4.0.3
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="Soenneker.Hashing.Phc" Version="4.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Hashing.Phc" Version="4.0.3" />
<PackageReference Include="Soenneker.Hashing.Phc" />
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 Soenneker.Hashing.Phc --version 4.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Hashing.Phc, 4.0.3"
#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 Soenneker.Hashing.Phc@4.0.3
#: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=Soenneker.Hashing.Phc&version=4.0.3
#tool nuget:?package=Soenneker.Hashing.Phc&version=4.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Soenneker.Hashing.Phc
A dependency-free .NET library for formatting and parsing Password Hashing Competition (PHC) strings.
Installation
dotnet add package Soenneker.Hashing.Phc
Usage
using Soenneker.Hashing.Phc;
PhcString value = PhcFormatter.Parse(
"$argon2id$v=19$m=65536,t=3,p=4$c29tZXNhbHQ$YW5kYWZha2VoYXNo");
value.TryGetParameter("m", out string? memoryCost);
string encoded = value.ToString();
bool valid = PhcFormatter.IsValid(encoded);
Build a PHC string while preserving explicit parameter order:
var value = new PhcString(
identifier: "argon2id",
version: 19,
parameters:
[
new("m", "65536"),
new("t", "3"),
new("p", "4")
],
salt: "c29tZXNhbHQ",
hash: "YW5kYWZha2VoYXNo");
string encoded = PhcFormatter.Format(value);
TryParse and TryFormat are available for failure-based and span-oriented call sites.
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Soenneker.Utils.PooledStringBuilders (>= 4.0.29)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Soenneker.Hashing.Phc:
| Package | Downloads |
|---|---|
|
Soenneker.Hashing.Argon2
A utility library for Argon2 hashing and verification |
|
|
Soenneker.Hashing.Pbkdf2
A utility library for Pbkdf2 hashing and verification. |
GitHub repositories
This package is not used by any popular GitHub repositories.