FILE* f = fopen("/dev/qrandom0", "r");
unsigned char c = fgetc(f);
while (c == 0x00) c = fgetc(f);
- (*chunk)[0] = c & (unsigned char)((rand() & 0xFF));
+ (*chunk)[0] = c ^ rand();
for (int i = 0; i < QANSEL_QUANTIS_CHUNK_SIZE - 1; i++)
{
- (*chunk)[i + 1] = fgetc(f) & (unsigned char)((rand() & 0xFF));
+ (*chunk)[i + 1] = fgetc(f) ^ rand();
}
fclose(f);
}
\ No newline at end of file