@Xor-el

I did a series of speed tests on several pascal libraries/projects: Wolfgang Ehrhardt's hashing units, DCPCrypt, LockBox3, HashLib4Pascal, ZlibEx (

https://www.base2ti.com/), LibRHash4P.

Best results:

1. CRC32

32-bit: ZlibEx 495 MB/s, Wolfgang E. 315 MB/s

64-bit: ZlibEx 335 MB/s, LibRHash 314 MB/s

2. Adler32

32-bit: ZlibEx 761 MB/s, Wolfgang E. 605 MB/s

64-bit: Wolfgang E. 614 MB/s, ZlibEx 257 MB/s

3. MD5

32-bit: LibRHash 368 MB/s, Wolfgang E. 251 MB/s, HashLib4Pascal 233 MB/s

64-bit: LibRHash 343 MB/s, Wolfgang E. 226 MB/s

4. SHA-1

32-bit: LibRHash 428 MB/s, Wolfgang E. 170 MB/s

64-bit: LibRHash 186 MB/s, Wolfgang E. 154 MB/s

5. SHA2-256

32-bit: LibRHash 223 MB/s, Wolfgang E. 104 MB/s

64-bit: LibRHash 142 MB/s, HashLib4Pascal 93 MB/s

6. SHA2-512

32-bit: LibRHash 235 MB/s, Wolfgang E. 50 MB/s

64-bit: LibRHash 207 MB/s, HashLib4Pascal 131 MB/s

7. SHA3-256

32-bit: LibRHash 59 MB/s, Wolfgang E. 52 MB/s

64-bit: Wolfgang E. 129 MB/s, LibRHash 115 MB/s

8. SHA3-512

32-bit: LibRHash 32 MB/s, Wolfgang E. 29 MB/s

64-bit: Wolfgang E. 75 MB/s, LibRHash 65 MB/s

All the above results were obtained by the application compiled using Delphi XE7.

Conclusions:

In most cases, LibRHash proved to be the fastest, but an external DLL/SO library file is required.

From the Pascal-world, Wolfgang units and the HashLib4Pascal deserve special mention. DCPCrypt is medium and LockBox is very, very slow.

HashLib4Pascal is currently the most complete hashing library and is still being developed. Wolfgang, unfortunately, will not make any updates anymore, but he left us a lot of great mathematical, hashing and cryptographic pascal units.

Some time ago I did a series of tests with a program compiled using Free Pascal, and I noticed that some hashing algorithms work faster than in Delphi, some much faster! But I have no results. When I find some time, I will do speed tests with the latest Free Pascal and Delphi Rio.

You did a really good job with HashLib4Pascal and several other projects. Thanks.