#!/usr/bin/perl
# -----------------------------------------------------------------------------
# $id$
# -----------------------------------------------------------------------------
require 5.006;
use strict;
use warnings;
use lib (map{ (($0 =~ m%(.*[\\\/])[^\\\/]*$%)[0] || "").$_ } qw(main));
use Crypt;

$| = 1; # autoflush
print "This tool encrypts your raw password for conf file of the Tiarra.\n";
print "\n";
print "Please enter raw password: ";

(my $raw = <>) =~ s/[\r\n]//g;
print "\n";
print Crypt::encrypt($raw)." is your encoded password.\n";
print "Use this for the general/tiarra-password entry.\n";

