By default, don't randomize read sizes in checksum programs.

This can still be done by adding a #define, if desired.
This commit is contained in:
Stephen Heumann 2017-11-19 22:48:43 -06:00
parent df0de0d979
commit b5b268982a

View File

@ -47,7 +47,11 @@ int main(int argc, char **argv) {
concat(HASH_FUNCTION,_init)(&ctx);
do {
#ifdef RANDOMIZE_READ_SIZE
count = (rand() & 0x7FFF) + 1;
#else
count = 0x8000ul;
#endif
count = fread(buf, 1, count, file);
concat(HASH_FUNCTION,_update)(&ctx, buf, count);
} while (count != 0);