summaryrefslogtreecommitdiff
path: root/modules/pam_unix/bigcrypt_main.c
blob: 708190725b079ee257477f9f0a31d485a7004fe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include <string.h>

extern const char *bigcrypt(const char *password, const char *salt);

int
main(int argc, char **argv)
{
	if (argc < 3) {
		fprintf(stderr, "Usage: %s password salt\n",
			strchr(argv[0], '/') ?
			(strchr(argv[0], '/') + 1) :
			argv[0]);
		return 0;
	}
	fprintf(stdout, "%s\n", bigcrypt(argv[1], argv[2]));
	return 0;
}