aboutsummaryrefslogtreecommitdiff
path: root/src/tests/cryptpass.cpp
blob: f9abef6739ffb71f922208cc8ec9d530a66ba97c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright (C) 2007-2010 Xagasoft, All rights reserved.
 *
 * This file is part of the libbu++ library and is released under the
 * terms of the license contained in the file LICENSE.
 */

#include "bu/crypt.h"
#include "bu/sio.h"

using namespace Bu;

int main( int argc, char *argv[] )
{
	if( argc == 1 )
		sio << "Syntax: " << argv[0] << " <password> [salt]" << sio.nl
			<< sio.nl;
	else if( argc == 2 )
		sio << "Crypt1:  >> " << cryptPass( argv[1] ) << " <<" << sio.nl;
	else
		sio << "Crypt2:  >> " << cryptPass( argv[1], argv[2] ) << " <<" << sio.nl;

	return 0;
}