fclose(ctx->random_file);
if (ctx->verbose) printf("QAnsel: Hardware `Quantis` selected.\n");
ctx->hardware_rng = QANSEL_HARDWARE_QUANTIS;
- ctx->pointer = QUANTIS_CHUNK_SIZE;
+ ctx->pointer = QANSEL_QUANTIS_CHUNK_SIZE;
}
}
if (ctx->optimization_level & QANSEL_MODE_METAL)
void qansel_quantis_chunk(unsigned char** chunk)
{
if ((*chunk) != NULL) free(*chunk);
- *chunk = malloc(QUANTIS_CHUNK_SIZE);
+ *chunk = malloc(QANSEL_QUANTIS_CHUNK_SIZE);
FILE* f = fopen("/dev/qrandom0", "r");
unsigned char c = fgetc(f);
while (c == 0x00) c = fgetc(f);
(*chunk)[0] = c;
- for (int i = 0; i < QUANTIS_CHUNK_SIZE - 1; i++)
+ for (int i = 0; i < QANSEL_QUANTIS_CHUNK_SIZE - 1; i++)
{
(*chunk)[i + 1] = fgetc(f);
}
#else
#error "Unknown platform"
#endif
-
-#define QUANTIS_CHUNK_SIZE 4096
+#define QANSEL_QUANTIS_CHUNK_SIZE 4096
int qansel___get_core_count();
int qansel_get_core_count();
#define QANSEL_HARDWARE_TRUERNG 2
#define QANSEL_HARDWARE_RDSEED 3
#define QANSEL_HARDWARE_QUANTIS 4
-#define QANSEL_QUANTIS_CHUNK_SIZE 4096
#define QANSEL_INSTRUCTION_X 0x10
#define QANSEL_INSTRUCTION_Y 0x11
#define QANSEL_INSTRUCTION_Z 0x12