]> foleosoft.com Git - QAnsel.git/commitdiff
Thu Aug 15 07:33:24 PM EDT 2024
authormiha-q <>
Thu, 15 Aug 2024 23:33:24 +0000 (19:33 -0400)
committermiha-q <>
Thu, 15 Aug 2024 23:33:24 +0000 (19:33 -0400)
src/hardware.c

index 4c375de3dded9ecbb7924f7db01ca93c4891ee72..be2c257cc041e9e6b4016a914f808653084319ef 100644 (file)
@@ -133,10 +133,10 @@ void qansel_quantis_chunk(unsigned char** chunk)
     FILE* f = fopen("/dev/qrandom0", "r");
     unsigned char c = fgetc(f);
     while (c == 0x00) c = fgetc(f);
-    (*chunk)[0] = c;
+    (*chunk)[0] = c - 1;
     for (int i = 0; i < QANSEL_QUANTIS_CHUNK_SIZE - 1; i++)
     {
-        (*chunk)[i + 1] = fgetc(f);
+        (*chunk)[i + 1] = fgetc(f) - 1;
     }
     fclose(f);
 }
\ No newline at end of file