[Melbourne-pm] OT[sort of] plain hashing text passwords

Toby Wintermute tjc at wintrmute.net
Wed Oct 7 20:10:27 PDT 2009


2009/10/8 John Thornton <jdthornton at ozemail.com.au>:
>                          So, does anyone here know how to
> hash/encrypt/disguise passwords that are in plain text, as the password is
> on my computer in the .yml file.

use Digest::SHA;
my $password = "secret_password";
my $sha = Digest::SHA->new;
$sha->add($password);
print "My hashed result is: " . $sha->hexdigest ."\n";


More information about the Melbourne-pm mailing list