I'm using the blake2b hash in my program on all platforms. However the blake2s hash is more efficient on non-64bit architectures. Is it possible to have the 64bit file compiled on 64bit systems and the blake2s file compiled on all others?
- BLAKE2b (or just BLAKE2) is optimized for 64-bit platforms—including NEON-enabled ARMs—and produces digests of any size between 1 and 64 bytes
- BLAKE2s is optimized for 8- to 32-bit platforms and produces digests of any size between 1 and 32 bytes
Source: https://blake2.net/
The only thing I can think of is to manually list all 64bit architectures in one file and negate them in the other. This would work but isn't clean and would need to be updated every time a new architecture is added.