6 Commits

Author SHA1 Message Date
5c64df35e5 HASH: Remove obsolete specific xxh64_*() functions.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 17:32:04 -03:00
467609bc00 HASH: Add generic function xxh64().
This function calculates the XXH64 has using a sequence of bytes, or
integer(kind=1) vector.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 17:31:48 -03:00
3dbbd0b8b1 HASH: Change kind of local variables.
Local variables remain and offset cannot be larger than the size of
input array, so they can be 4-byte integers.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 08:32:27 -03:00
e1e025017a HASH: Rename argument data to input.
Word DATA is reserved in Fortran. Rename this argument, just to avoid
confusion.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 07:05:44 -03:00
86c7f87365 HASH: Fix hash calculation in xxh64_integer() for odd length vectors.
If the input data has an odd number of elements, the last 4-byte
element has to be padded by 4-byte structure of zeros.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 06:57:26 -03:00
cf39fa7292 HASH: Add Fortran implementation of 64-bit xxHash function.
The aim of the hash function is to verify consistency of the binary data
written in the snapshots.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-11 14:00:16 -03:00