wan24-Crypto-NaCl
1.2.0
See the version list below for details.
dotnet add package wan24-Crypto-NaCl --version 1.2.0
NuGet\Install-Package wan24-Crypto-NaCl -Version 1.2.0
<PackageReference Include="wan24-Crypto-NaCl" Version="1.2.0" />
paket add wan24-Crypto-NaCl --version 1.2.0
#r "nuget: wan24-Crypto-NaCl, 1.2.0"
// Install wan24-Crypto-NaCl as a Cake Addin
#addin nuget:?package=wan24-Crypto-NaCl&version=1.2.0
// Install wan24-Crypto-NaCl as a Cake Tool
#tool nuget:?package=wan24-Crypto-NaCl&version=1.2.0
wan24-Crypto-NaCl
This library adopts NSec to
wan24-Crypto and extends the
wan24-Crypto
library with these algorithms:
Algorithm | ID | Name |
---|---|---|
KDF | ||
Argon2id | 1 | ARGON2ID |
How to get it
This library is available as NuGet package.
Usage
In case you don't use the wan24-Core
bootstrapper logic, you need to
initialize the NaCl extension first, before you can use it:
wan24.Crypto.NaCl.Bootstrapper.Boot();
This will register the algorithms to the wan24-Crypto
library.
To set NaCl defaults as wan24-Crypto
defaults:
NaClHelper.SetDefaults();
Per default the current wan24-Crypto
default will be set as counter
algorithms to HybridAlgorithmHelper
.
Argon2id
A simple KDF operation example:
(byte[] stretchedPwd, byte[] salt) = KdfArgon2IdAlgorithm.Instance.Stretch(pwd, len: 32);
To use Argon2id as default KDF algorithm:
KdfHelper.DefaultAlgorithm = KdfArgon2IdAlgorithm.Instance;
You may specify Argon2id specific options using the KdfArgon2IdOptions
,
which cast implicit to/from a JSON string. The default options are the OWASP
recommendations (46M memory usage):
(byte[] stretchedPwd, byte[] salt) = pwd.Stretch(len: 32, options: new KdfArgon2IdOptions()
{
// Configure the options here
});// KdfArgon2IdOptions cast implicit to CryptoOptions
Or when using CryptoOptions
:
CryptoOptions options = new()
{
KdfAlgorithm = KdfArgon2IdAlgorithm.ALGORITHM_NAME,
KdfIterations = KdfArgon2IdAlgorithm.Instance.DefaultIterations,
KdfOptions = new KdfArgon2IdOptions()
{
// Configure the options here
}
};
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- NSec.Cryptography (>= 22.4.0)
- wan24-Core (>= 1.35.0)
- wan24-Crypto (>= 1.20.1)
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 |
---|---|---|
2.4.0 | 100 | 3/9/2024 |
2.3.0 | 93 | 3/2/2024 |
2.2.0 | 79 | 2/24/2024 |
2.1.2 | 83 | 2/17/2024 |
2.1.1 | 94 | 2/11/2024 |
2.1.0 | 76 | 2/10/2024 |
2.0.0 | 84 | 1/21/2024 |
1.4.2 | 125 | 11/11/2023 |
1.4.1 | 114 | 10/21/2023 |
1.4.0 | 107 | 10/15/2023 |
1.3.0 | 100 | 10/8/2023 |
1.2.0 | 100 | 10/1/2023 |
1.1.0 | 90 | 9/19/2023 |
1.0.0 | 87 | 9/16/2023 |