dotnet add package HashBrowns --version 3.0.23
NuGet\Install-Package HashBrowns -Version 3.0.23
<PackageReference Include="HashBrowns" Version="3.0.23" />
paket add HashBrowns --version 3.0.23
#r "nuget: HashBrowns, 3.0.23"
// Install HashBrowns as a Cake Addin #addin nuget:?package=HashBrowns&version=3.0.23 // Install HashBrowns as a Cake Tool #tool nuget:?package=HashBrowns&version=3.0.23
HashBrowns is a library to help simplify encryption within .Net.
To use the library you first need to set up things on the ServiceCollection. Thankfully this only takes one call to do:
This is required prior to using the CryptoManager or extension methods class for the first time. Once Canister is set up, you can use the CryptoManager class:
var Instance = Canister.Builder.Bootstrapper.Resolve<CryptoManager>().Encrypt(...);
However instead of having the IoC container create the class, you can also use the extension methods found in the HashBrowns namespace:
var EncryptedData = "My string that I want to encrypt".Encrypt(Key, Salt, HashingAlgorithm, NumberIterations, InitialVector, KeySize, EncryptionAlgorithm);
Similarly you can decrypt:
var DecryptedData = EncryptedData.Decrypt(Key, Salt, HashingAlgorithm, NumberIterations, InitialVector, KeySize, EncryptionAlgorithm);
Also hashing is available:
var MyHashedValue = "Example data".Hash(HashingAlgorithm);
The library is available via Nuget with the package name "HashBrowns". To install it run the following command in the Package Manager Console:
|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.|
- BigBook (>= 5.0.27)
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.