A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ron4fun/SharpHash below:

ron4fun/SharpHash: SharpHash is a C# hashing library which provides an easy to use interface for computing hashes and checksums of data. It also supports state based (incremental) hashing.

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.

Non-Cryptographic Hash Functions Cryptographic Hash Functions Password Hashing Schemes (Password Based Key Derivation Functions) XOF (Extendable Output Function)
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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4