<commit_before>#include "tools.h"

#include <time.h>

#include "von_neumann.h"
#include "aes.h"
#include "mersenne_twister.h"
#include "old_c_rand.h"

static word16 x; // nombre entre 1000 et 9999 pour <NAME>ann
static struct mt19937p mt; // Pour Mersenne-Twister
static int seed; // Pour Mersenne-Twister
static u32 Kx[NK], Kex[NB*NR], Px[NB]; // pour l'AES

void autoseed_old_c_rand() {
  srand(rdtsc());
  seed = rand();
  oldinit_rand(seed);
}

void autoseed_aes() {
  init_rand(Kx, Px, NK, NB, 45);
  KeyExpansion(Kex,Kx);
}

void autoseed_von_neumann() {
  x=1111;
}

void autoseed_mesrene_twister() {
  int tmp = rand();
  sgenrand(time(NULL)+(tmp), &mt);
}

word32 autonext_old_c_rand() {
  return oldrand();
}

word32 autonext_aes() {
  return AES(Px, Kex);
}

word16 autonext_von_neumann() {
  return Von_Neumann(&x);
}

word32 autonext_mesrene_twister() {
  return genrand(&mt);
}

word8 msb(int word) {
  return (word >> 27) & 0x0F;
}

word8 lsb(int word) {
  return word & 0x0F;
}
<commit_msg>Change comment<commit_after>#include "tools.h"

#include <time.h>

#include "von_neumann.h"
#include "aes.h"
#include "mersenne_twister.h"
#include "old_c_rand.h"

static word16 x; // nombre entre 1000 et 9999 pour Von Neumann
static struct mt19937p mt; // Pour Mersenne-Twister
static u32 Kx[NK], Kex[NB*NR], Px[NB]; // pour l'AES

void autoseed_old_c_rand() {
  srand(rdtsc());
  int seed = rand();
  oldinit_rand(seed);
}

void autoseed_aes() {
  init_rand(Kx, Px, NK, NB, 45);
  KeyExpansion(Kex,Kx);
}

void autoseed_von_neumann() {
  x=1111;
}

void autoseed_mesrene_twister() {
  int tmp = rand();
  sgenrand(time(NULL)+(tmp), &mt);
}

word32 autonext_old_c_rand() {
  return oldrand();
}

word32 autonext_aes() {
  return AES(Px, Kex);
}

word16 autonext_von_neumann() {
  return Von_Neumann(&x);
}

word32 autonext_mesrene_twister() {
  return genrand(&mt);
}

word8 msb(int word) {
  return (word >> 27) & 0x0F;
}

word8 lsb(int word) {
  return word & 0x0F;
}

{'fraction_non_alphanumeric': 0.1537683358624178, 'fraction_numerical': 0.03945371775417299, 'mean_word_length': 4.571830985915493, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7336671', 'n_tokens_mistral': 940, 'n_tokens_neox': 851, 'n_words': 186}