aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/kdb/db2/libdb2/test/hash2.tests/passwd/genpass.c
blob: da376768782964c2065eda4a13d4b5f0ba40f33b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include <stdlib.h>

void
main(int argc, char **argv)
{
	int i,j,n;
	char *pass[8], r;
	
	n = atoi(argv[1]);

	srandom(101173);
	for (i = 0; i < n; i++) {
		for (j = 0; j < 8; j++) {
			r = random() % 122;
			while (r < 48)
				r += random() % (122 - r);
			printf("%c", r);
		}
		printf("\n");
	}
}