![]() |
VOOZH | about |
dotnet add package SharpHash --version 1.2.0
NuGet\Install-Package SharpHash -Version 1.2.0
<PackageReference Include="SharpHash" Version="1.2.0" />
<PackageVersion Include="SharpHash" Version="1.2.0" />Directory.Packages.props
<PackageReference Include="SharpHash" />Project file
paket add SharpHash --version 1.2.0
#r "nuget: SharpHash, 1.2.0"
#:package SharpHash@1.2.0
#addin nuget:?package=SharpHash&version=1.2.0Install as a Cake Addin
#tool nuget:?package=SharpHash&version=1.2.0Install as a Cake Tool
SharpHash is a C# hashing library that provides a fluent interface for computing hashes and checksums of strings, files, streams, bytearrays and untyped data to mention but a few.
It also supports Incremental Hashing, Cloning, NullDigest and HashName Builder.
All CRC Variants from CRC3 to CRC64 ✔️Adler32 ✔️AP BKDR Bernstein Bernstein1 DEK DJB ELF FNV ✔️
FNV1a JS Jenkins3 Murmur2 MurmurHash3_x86_32 OneAtTime ✔️
PJW RS Rotating SDBM ShiftAndXor SuperFast XXHash32 ✔️
FNV64 FNV1a64 Murmur2_64 SipHash64_2_4 XXHash64 ✔️MurmurHash3_x86_128 MurmurHash3_x64_128 SipHash128_2_4 ✔️MD2 ✔️
MD4 ✔️
MD5 ✔️
SHA-0 ✔️
SHA-1 ✔️
SHA-2 (224, 256, 384, 512, 512-224, 512-256) ✔️
GOST 34.11-94 ✔️
GOST R 34.11-2012 (AKA Streebog) (256, 512) ✔️
Grindahl (256, 512) ✔️
HAS160 ✔️
RIPEMD (128, 256, 256, 320) ✔️
Tiger (128, 160, 192 (Rounds 3, 4, 5)) ✔️
Tiger2 (128, 160, 192 (Rounds 3, 4, 5)) ✔️
Snefru (128, 256) ✔️
Haval (128, 160, 192, 224, 256 (Rounds 3, 4, 5)) ✔️
Panama ✔️
RadioGatun (RadioGatun32, RadioGatun64) ✔️
WhirlPool ✔️
Blake2B (160, 256, 384, 512) ✔️
Blake2S (128, 160, 224, 256) ✔️
SHA-3 (224, 256, 384, 512) ✔️
Keccak (224, 256, 288, 384, 512) ✔️
Blake2BP ✔️
Blake2SP ✔️
Blake3 ✔️
PBKDF2 ✔️
Argon2 (2i, 2d and 2id variants) ✔️
Scrypt ✔️
HMAC (all supported hashes) ✔️
KMAC (KMAC128, KMAC256) ✔️
Blake2MAC (Blake2BMAC, Blake2SMAC) ✔️
Shake (Shake-128, Shake-256) ✔️
CShake (CShake-128, CShake-256) ✔️
Blake2X (Blake2XS, Blake2XB) ✔️
KMACXOF (KMAC128XOF, KMAC256XOF) ✔️
Blake3XOF ✔️
using SharpHash.Base;
using SharpHash.Interfaces;
using System;
using System.Text;
namespace Program
{
public class Hello
{
public static void Main()
{
// Chaining mode
string result = HashFactory.Crypto.CreateMD5()
.ComputeString("Hello C#", Encoding.UTF8).ToString();
// Incremental mode
IHash hash = HashFactory.Crypto.CreateMD5();
hash.Initialize();
hash.TransformString("Hello", Encoding.UTF8);
hash.TransformString(" C#", Encoding.UTF8);
string result_2 = hash.TransformFinal().ToString();
bool check = result == result_2;
// Using the HashName Builder variation
IHash hash_builder = HashFactory.CreateHash("md5");
string result_3 = hash_builder.ComputeString("Hello C#",
Encoding.UTF8).ToString();
bool check_2 = result == result_3;
}
}
}
If you want implementations in other languages, you can check out these
1Mcci95WffSJnV6PsYG7KD1af1gDfUvLe6| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 is compatible. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
Showing the top 3 NuGet packages that depend on SharpHash:
| Package | Downloads |
|---|---|
|
HDWallet.Algorand
Package Description |
|
|
BTCTrader.HDWallet.Aptos
Generic HD wallet for Aptos |
|
|
KFKLib.Hash
Package Description |
This package is not used by any popular GitHub repositories.