aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_unix/bigcrypt_main.c
blob: 22d325da48df9b0ba578d55f2ffc94b8d768cdbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "config.h"

#include <stdio.h>
#include <string.h>

#include "bigcrypt.h"

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;
}