Dev_Vernam/prgm/generate.c

18 lines
301 B
C
Raw Normal View History

2022-12-15 22:27:05 +01:00
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "fonctions.h"
int generate(int count)
{
char cle[count];
int a,i;
char characteres[26]="azertyuiopqsdfghjklmwxcvbn";
srand(time(NULL));
for(a=0;a<count;a++)
{
i = rand()%26;
cle[a]=characteres[i];
}
return EXIT_SUCCESS;
}