Home

Awesome

HashLibPlus-Reload License

HashLibPlus is a recommended C++11 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.

Available Algorithms

Hashes


Cyclic Redundancy Checks
Checksums
Non-Cryptographic Hash Functions

32 bit hashes
64 bit hashes
128 bit hashes
Cryptographic Hash Functions

Key Derivation Functions


Password Hashing Schemes (Password Based Key Derivation Functions)

MAC


XOF (Extendable Output Function)


Usage Examples


#include "Base/HashFactory.h"

int main() 
{
    IHash hash = HashFactory::Crypto::CreateMD5();
		
    IHash clone = hash->Clone();

    IHMAC hmac = HashFactory::HMAC::CreateHMAC(hash);
    hmac->SetKey(Converters::ConvertStringToBytes("password"));

    IHashResult Result1 = hash->ComputeString("Hash");
    IHashResult Result2 = hmac->ComputeString("Hash");
	
    bool check = Result1->CompareTo(Result2);
    
    return 0;
}

How to build library

Note: catch2 library was used as the test framework in the HashLibPlus.Test project.

1. Build the HashLibPlus-Reloaded project firstly.

2. Drag and drop the built HashLibPlus-Reload Release *.obj files (except for HashLibPlus.obj) into HashLibPlus.Test project in Visual Studio (to avoid link issues) then build.


This executable displays a benchmark test analysis of the compiled code speed with regards to your C.P.U capability.


This executable hooks into catch2 process to allow for detailed test results, and other command line options that catch2 supports for those that wish to pass values to catch2 interface.

Other Implementations


If you want implementations in other languages, you can check out these

Tip Jar