Added experimental makepkg-update-checksums.sh
[mirrors/Programs.git] / c / crypt / keygen.c
1 #include <stdio.h>
2 #include <stdlib.h>
3
4 int main(int argc, char *argv[])
5 {
6 int r;
7 float i;
8 i = 1024; //Cycles
9 if(argc > 1) {
10 if( strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "/?") == 0 ) {
11 printf("Usage: keygen [X] [> key.txt]\n");
12 printf("keygen - generates 1024 random chars (bytes) to stdin\n");
13 printf("keygen X - generates X random chars (bytes) to stdin\n");
14 printf("keygen [X] > key.txt - generates X random chars (bytes) to key.txt\n");
15 }
16 i = atof(argv[1]);
17 }
18 srand(time(0));
19 while(i>0) {
20 r = rand();
21 putchar(r);
22 //sleep(500);
23 i--;
24 }
25 //system("PAUSE");
26 return 0;
27 }
This page took 1.046964 seconds and 4 git commands to generate.