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

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

my $term = Term::ReadLine->new('tiarra');
my $raw = $term->readline("Please enter raw password: ");

print "\n";
print Crypt::encrypt($raw)." is your encoded password.\n";
print "Use this for the general/tiarra-password entry.\n";
