Based on the comparison on this page:
I’d expect sha-1 to be pretty fast. It claims sha-1 is 909 MiB per second. Maybe there’s some overhead in using openSSL, or at least in the way crystal calls to openSSL?
You might want to pick up the minimal C-source for one of the faster digests, and see what happens if you try to call that directly from crystal. (or rewrite it in crystal, if you’re more ambitious! ). It happens that I wanted to try out blake2b yesterday, so I know a nice small repository for that source is at:
One nice thing about blake2 is that you can select what size you want for the digest values, from 1 to 64 bytes.
The dumb little C-test program that I wrote yesterday is able to process 2,397 files (with a total of 37,169,518 bytes) in 0.21 seconds. There are two versions of blake2: blake2s for CPU’s with 32-bit ints, and blake2b for CPU’s with 64-bit ints. My simple program took advantage of blake2b.