mirror of
https://github.com/sheumann/65816-crypto.git
synced 2024-11-21 16:31:11 +00:00
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:
parent
df0de0d979
commit
b5b268982a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user