Updated version attached. 16-, 32-, 64- and 128-bit words work, obviously turning off runtime checks and increasing the optimisation level (although the RTL I'm using is unoptimised) speeds things up:
$ time ./Hash16Demo-x86_64-linux
Internal check: primality tests passed
Internal check: passphrase hashing passed
Difference: DD7B 1101110101111011 12
real 0m0.001s
user 0m0.001s
sys 0m0.000s
$ time ./Hash32Demo-x86_64-linux
Internal check: primality tests passed
Internal check: passphrase hashing passed
Difference: 8EBB1617 10001110101110110001011000010111 17
real 0m0.001s
user 0m0.001s
sys 0m0.000s
$ time ./Hash64Demo-x86_64-linux
Internal check: primality tests passed
Internal check: passphrase hashing passed
Difference: 4A450DE35FE54A5F 0100101001000101000011011110001101011111111001010100101001011111 34
real 0m9.346s
user 0m9.341s
sys 0m0.004s
$ time ./Hash128Demo-x86_64-linux
Internal check: primality tests passed
Internal check: passphrase hashing passed
Difference: F020AB06A60C27202257A1C7AEB1D5C9 11110000001000001010101100000110101001100000110000100111001000000010001001010111101000011100011110101110101100011101010111001001 56
real 227m22.372s
user 227m16.241s
sys 0m1.208s
If assertions are enabled there are internal tests of prime number handling, followed by hashing a short password and looking for the nearest prime: predictably, it is there that the time is being spent (and I am /not/ complaining about that, since the prime checker is fairly naive and there are obvious ways it could be improved).
If INTERNALTEST is defined and there are no commandline parameters the program will hash two passphrases and find the number of bits by which they differ (Hamming distance?) which is what's being displayed above; ideally that would be half the wordsize.
Contributed as test code with the hope that it is useful to somebody, or at least a source of mirth :-)
MarkMLl