GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ron4fun/HashLibPlus-Reload: 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.

BranchesTags
Open more actions menu

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
Base
Base
 
 
Checksum
Checksum
 
 
Crypto
Crypto
 
 
Enum
Enum
 
 
Hash128
Hash128
 
 
Hash32
Hash32
 
 
Hash64
Hash64
 
 
HashlibPlus.Test
HashlibPlus.Test
 
 
Interfaces
Interfaces
 
 
KDF
KDF
 
 
MAC
MAC
 
 
NullDigest
NullDigest
 
 
Nullable
Nullable
 
 
Params
Params
 
 
Utils
Utils
 
 
.gitignore
.gitignore
 
 
HashLibPlus-Reload.sdf
HashLibPlus-Reload.sdf
 
 
HashLibPlus-Reload.sln
HashLibPlus-Reload.sln
 
 
HashLibPlus-Reload.vcxproj
HashLibPlus-Reload.vcxproj
 
 
HashLibPlus-Reload.vcxproj.filters
HashLibPlus-Reload.vcxproj.filters
 
 
HashLibPlus-Reload.vcxproj.user
HashLibPlus-Reload.vcxproj.user
 
 
HashLibPlus.cpp
HashLibPlus.cpp
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

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
  • All CRC Variants from CRC3 to CRC64 ✔️
Checksums
  • Adler32 ✔️
Non-Cryptographic Hash Functions

32 bit hashes
  • AP BKDR Bernstein Bernstein1 DEK DJB ELF FNV ✔️

  • FNV1a JS Jenkins3 Murmur2 MurmurHash3_x86_32 OneAtTime ✔️

  • PJW RS Rotating SDBM ShiftAndXor SuperFast XXHash32 ✔️

64 bit hashes
  • FNV64 FNV1a64 Murmur2_64 SipHash64_2_4 XXHash64 ✔️
128 bit hashes
  • MurmurHash3_x86_128 MurmurHash3_x64_128 SipHash128_2_4 ✔️
Cryptographic Hash Functions

  • 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 ✔️

Key Derivation Functions


Password Hashing Schemes (Password Based Key Derivation Functions)

  • PBKDF2 ✔️

  • Argon2 (2i, 2d and 2id variants) ✔️

  • Scrypt ✔️

MAC


  • HMAC (all supported hashes) ✔️

  • KMAC (KMAC128, KMAC256) ✔️

  • Blake2MAC (Blake2BMAC, Blake2SMAC) ✔️

XOF (Extendable Output Function)


  • Shake (Shake-128, Shake-256) ✔️

  • CShake (CShake-128, CShake-256) ✔️

  • Blake2X (Blake2XS, Blake2XB) ✔️

  • KMACXOF (KMAC128XOF, KMAC256XOF) ✔️

  • Blake3XOF ✔️

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"));

    HashResult Result1 = hash->ComputeString("Hash");
    HashResult 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.

  • HashLibPlus.exe

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

  • HashLibPlus.Test.exe

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

  • SharpHash by Mbadiwe Nnaemeka Ronald
  • HashLib4Pascal by Ugochukwu Mmaduekwe

Tip Jar


  • 💵 Bitcoin: 1Mcci95WffSJnV6PsYG7KD1af1gDfUvLe6

About

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.

Resources

Readme
License
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.