Zhomfr.Hash.Argon2
0.7.0
dotnet add package Zhomfr.Hash.Argon2 --version 0.7.0
NuGet\Install-Package Zhomfr.Hash.Argon2 -Version 0.7.0
<PackageReference Include="Zhomfr.Hash.Argon2" Version="0.7.0" />
<PackageVersion Include="Zhomfr.Hash.Argon2" Version="0.7.0" />
<PackageReference Include="Zhomfr.Hash.Argon2" />
paket add Zhomfr.Hash.Argon2 --version 0.7.0
#r "nuget: Zhomfr.Hash.Argon2, 0.7.0"
#:package Zhomfr.Hash.Argon2@0.7.0
#addin nuget:?package=Zhomfr.Hash.Argon2&version=0.7.0
#tool nuget:?package=Zhomfr.Hash.Argon2&version=0.7.0
Argon 2 Driver for Zhomfr.Hash.Abstractions
⚠️ Warning: Active Development (< 1.0.0)
Prior to the release of stable version
1.0.0, this library follows SemVer for initial development. This means breaking changes may occur even in minor releases (0.x).We strongly recommend pinning the package version in your
.csprojto avoid unexpected build errors.
This library provides an Argon2 implementation of the Zhomfr.Hash.Abstractions hashing contract.
📦 Installation
Install package:
dotnet add package Zhomfr.Hash.Argon2
After register service in DI:
using Zhomfr.Hash.Abstractions;
builder.Services.AddDefaultHash<Argon2Hash, Argon2Config>();
builder.Services.AddKeyedHash<Argon2Hash, Argon2Config>("AwesomeKey");
Configuration Convention
All settings are located in appsettings.json under the Zhomfr:Hash section:
- The default service uses the
Zhomfr:Hash:Defaultsubsection. - Keyed services use subsections where the name matches the service key, resulting in
Zhomfr:Hash:KeyName.
Your appsettings.json file should follow this structure:
{
"Zhomfr": {
"Hash": {
"Default": {
"Secret": "some32CharacterAlphaNumericString",
"Iterations": 10,
"MemorySize": 65536,
"DegreeOfParallelism": 4,
"SaltSize": 16
},
"AwesomeKey": {
"Secret": "some32CharacterAlphaNumericString",
"Iterations": 10,
"MemorySize": 65536,
"DegreeOfParallelism": 4,
"SaltSize": 16
}
}
}
}
And use in your own code:
using Zhomfr.Hash.Abstractions;
public class MyAwesomeClass(IHash cache){}
public class MyAwesomeClass([FromKeyedServices("AwesomeKey")]IHash cache){}
For more details, see the documentation for Nuget or GitHub.
| 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
- Konscious.Security.Cryptography.Argon2 (>= 1.3.1)
- Zhomfr.Hash.Abstractions (>= 0.7.0)
- Zhomfr.Validation.Rules (>= 0.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.