This patch makes the BLAKE2 reference implementation compatible with C89
compilers and MSVC.
1) Use C comments (/* */) instead of C++ comments.
2) No declarations after statements. All variables are declared on the
top of a block.
3) Optional inline with BLAKE2_LOCAL_INLINE() macro.
Signed-off-by: Christian Heimes <christian@python.org>
It may be desirable to produce a digest with a shorter length than the default
using a BLAKE2 algorithm. For example, the crypto_generichash() function in
libsodium uses BLAKE2b but shortens the digest to 256 bits by default and it is
useful for debugging to generate similar hashes with b2sum for comparison.
The requested digest length is specified in bits, must be a multiple of 8 and
cannot exceed the total output length of the selected algoritm. No minimum
digest length is enforced.
If a shorter-than-default digest length is selected, this is indicated in the
output when the '--tag' option is given.