Soenneker.Hashing.Argon2 3.0.40

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Hashing.Argon2 --version 3.0.40                
NuGet\Install-Package Soenneker.Hashing.Argon2 -Version 3.0.40                
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="3.0.40" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Soenneker.Hashing.Argon2 --version 3.0.40                
#r "nuget: Soenneker.Hashing.Argon2, 3.0.40"                
#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.
// Install Soenneker.Hashing.Argon2 as a Cake Addin
#addin nuget:?package=Soenneker.Hashing.Argon2&version=3.0.40

// Install Soenneker.Hashing.Argon2 as a Cake Tool
#tool nuget:?package=Soenneker.Hashing.Argon2&version=3.0.40                

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image 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 Compatible and additional computed target framework versions.
.NET net9.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
3.0.143 42 1/3/2025
3.0.142 36 1/3/2025
3.0.141 41 1/3/2025
3.0.140 37 1/3/2025
3.0.139 38 1/3/2025
3.0.138 34 1/3/2025
3.0.137 37 1/3/2025
3.0.136 34 1/3/2025
3.0.135 42 1/2/2025
3.0.134 40 1/2/2025
3.0.133 45 1/2/2025
3.0.132 41 1/2/2025
3.0.131 36 1/2/2025
3.0.130 35 1/2/2025
3.0.129 42 1/2/2025
3.0.128 53 1/1/2025
3.0.127 51 1/1/2025
3.0.126 47 1/1/2025
3.0.125 48 1/1/2025
3.0.124 48 1/1/2025
3.0.123 45 1/1/2025
3.0.122 45 1/1/2025
3.0.121 44 1/1/2025
3.0.120 46 1/1/2025
3.0.119 43 1/1/2025
3.0.118 51 1/1/2025
3.0.117 57 1/1/2025
3.0.116 71 12/31/2024
3.0.115 61 12/31/2024
3.0.114 66 12/31/2024
3.0.113 60 12/31/2024
3.0.112 60 12/31/2024
3.0.111 67 12/31/2024
3.0.110 69 12/31/2024
3.0.109 70 12/31/2024
3.0.108 71 12/31/2024
3.0.107 69 12/31/2024
3.0.106 77 12/31/2024
3.0.105 70 12/31/2024
3.0.104 71 12/31/2024
3.0.103 71 12/31/2024
3.0.102 71 12/31/2024
3.0.101 66 12/31/2024
3.0.100 68 12/31/2024
3.0.99 73 12/31/2024
3.0.98 68 12/31/2024
3.0.97 73 12/30/2024
3.0.96 70 12/30/2024
3.0.95 77 12/28/2024
3.0.94 73 12/28/2024
3.0.93 80 12/28/2024
3.0.92 77 12/28/2024
3.0.91 70 12/28/2024
3.0.90 75 12/27/2024
3.0.89 83 12/27/2024
3.0.88 75 12/27/2024
3.0.87 83 12/24/2024
3.0.86 71 12/24/2024
3.0.85 68 12/24/2024
3.0.84 75 12/24/2024
3.0.83 72 12/24/2024
3.0.82 76 12/24/2024
3.0.81 71 12/24/2024
3.0.80 71 12/24/2024
3.0.79 72 12/24/2024
3.0.78 79 12/24/2024
3.0.77 72 12/24/2024
3.0.76 74 12/24/2024
3.0.75 71 12/24/2024
3.0.74 71 12/24/2024
3.0.73 76 12/24/2024
3.0.72 70 12/24/2024
3.0.71 70 12/23/2024
3.0.70 75 12/23/2024
3.0.69 77 12/23/2024
3.0.68 75 12/23/2024
3.0.67 78 12/23/2024
3.0.66 72 12/23/2024
3.0.65 70 12/23/2024
3.0.64 76 12/23/2024
3.0.63 76 12/23/2024
3.0.62 68 12/23/2024
3.0.61 67 12/23/2024
3.0.60 85 12/22/2024
3.0.59 74 12/22/2024
3.0.58 73 12/22/2024
3.0.57 85 12/22/2024
3.0.56 70 12/22/2024
3.0.55 71 12/22/2024
3.0.54 81 12/22/2024
3.0.53 79 12/22/2024
3.0.52 74 12/22/2024
3.0.51 74 12/22/2024
3.0.50 82 12/22/2024
3.0.49 71 12/22/2024
3.0.48 87 12/22/2024
3.0.47 87 12/21/2024
3.0.46 76 12/21/2024
3.0.45 76 12/21/2024
3.0.44 76 12/21/2024
3.0.43 81 12/21/2024
3.0.42 75 12/21/2024
3.0.41 78 12/21/2024
3.0.40 72 12/21/2024
3.0.39 85 12/21/2024
3.0.38 76 12/21/2024
3.0.37 79 12/21/2024
3.0.36 74 12/21/2024
3.0.35 81 12/21/2024
3.0.34 84 12/21/2024
3.0.33 74 12/21/2024
3.0.32 79 12/20/2024
3.0.31 83 12/20/2024
3.0.30 86 12/20/2024
3.0.29 74 12/20/2024
3.0.28 73 12/20/2024
3.0.27 87 12/20/2024
3.0.26 68 12/20/2024
3.0.25 68 12/20/2024
3.0.24 82 12/20/2024
3.0.23 76 12/20/2024
3.0.22 83 12/20/2024
3.0.21 77 12/19/2024
3.0.20 73 12/19/2024
3.0.19 76 12/19/2024
3.0.18 73 12/19/2024
3.0.17 68 12/19/2024
3.0.16 75 12/19/2024
3.0.15 74 12/19/2024
3.0.14 76 12/19/2024
3.0.13 83 12/19/2024
3.0.12 75 12/19/2024
3.0.11 76 12/18/2024
3.0.9 87 12/17/2024
3.0.8 74 12/17/2024
3.0.7 81 12/17/2024
3.0.6 84 12/16/2024
3.0.5 87 12/16/2024
3.0.4 88 12/11/2024
3.0.3 98 12/11/2024
3.0.2 88 12/10/2024
3.0.1 88 12/10/2024