Soenneker.Hashing.Argon2
4.0.783
Prefix Reserved
dotnet add package Soenneker.Hashing.Argon2 --version 4.0.783
NuGet\Install-Package Soenneker.Hashing.Argon2 -Version 4.0.783
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.Argon2" Version="4.0.783" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Hashing.Argon2" Version="4.0.783" />
<PackageReference Include="Soenneker.Hashing.Argon2" />
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.Argon2 --version 4.0.783
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Hashing.Argon2, 4.0.783"
#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.Argon2@4.0.783
#: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.Argon2&version=4.0.783
#tool nuget:?package=Soenneker.Hashing.Argon2&version=4.0.783
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Soenneker.Hashing.Argon2
A utility library for Argon2 hashing and verification
Features
- Password Hashing: Generates a secure, Base64-encoded hash for a plaintext password.
- Password Verification: Verifies a plaintext password against a hashed value.
- Fully customizable parameters for salt size, hash size, iterations, memory usage, and parallelism.
Installation
dotnet add package Soenneker.Hashing.Argon2
Usage
1. Hashing a Password
string password = "SecurePassword123";
string hash = await Argon2HashingUtil.Hash(password);
// Result: A Base64-encoded hash string
Console.WriteLine(hash);
2. Verifying a Password
string password = "SecurePassword123";
string hash = await Argon2HashingUtil.Hash(password);
bool isValid = await Argon2HashingUtil.Verify(password, hash);
// Result: True if the password matches the hash
Console.WriteLine(isValid ? "Password is valid!" : "Invalid password.");
3. Custom Parameters
string password = "CustomPassword";
int saltSize = 32; // Custom salt size (bytes)
int hashSize = 64; // Custom hash size (bytes)
int iterations = 8; // Custom iteration count
int memorySize = 131072; // Custom memory size (KB)
int parallelism = 4; // Custom thread count
string hash = await Argon2HashingUtil.Hash(password, saltSize, hashSize, iterations, memorySize, parallelism);
bool isValid = await Argon2HashingUtil.Verify(password, hash, saltSize, hashSize, iterations, memorySize, parallelism);
Default Parameters
- Salt Size: 16 bytes
- Hash Size: 32 bytes
- Iterations: 4
- Memory Size: 65536 KB
- Parallelism: 2
| 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
- Konscious.Security.Cryptography.Argon2 (>= 1.3.1)
- Soenneker.Extensions.String (>= 4.0.699)
- Soenneker.Extensions.Task (>= 4.0.123)
- Soenneker.Utils.Random.Security (>= 4.0.301)
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 |
|---|---|---|
| 4.0.783 | 128 | 7/3/2026 |
| 4.0.782 | 110 | 6/20/2026 |
| 4.0.781 | 101 | 6/19/2026 |
| 4.0.780 | 107 | 6/19/2026 |
| 4.0.779 | 118 | 6/19/2026 |
| 4.0.778 | 110 | 6/19/2026 |
| 4.0.777 | 104 | 6/18/2026 |
| 4.0.775 | 120 | 6/16/2026 |
| 4.0.774 | 118 | 6/16/2026 |
| 4.0.773 | 106 | 6/10/2026 |
| 4.0.772 | 102 | 6/10/2026 |
| 4.0.771 | 109 | 6/9/2026 |
| 4.0.770 | 106 | 6/6/2026 |
| 4.0.769 | 101 | 6/6/2026 |
| 4.0.768 | 101 | 6/6/2026 |
| 4.0.767 | 111 | 6/5/2026 |
| 4.0.766 | 106 | 6/5/2026 |
| 4.0.765 | 102 | 6/5/2026 |
| 4.0.764 | 108 | 6/5/2026 |
| 4.0.763 | 109 | 5/13/2026 |
Loading failed
Update dependency Soenneker.Extensions.String to 4.0.699 (#1252)