Debian Codegraph @

bin/generate-crypted-password

raw
1 #!/usr/bin/env perl
2
3 use strict;
4 use Crypt::SaltedHash;
5
6 print "Enter plain-text password ?> ";
7 chomp(my $plain_text = <>);
8
9
10 my $csh = Crypt::SaltedHash->new(algorithm => 'SHA-1');
11 $csh->add($plain_text);
12 my $salted = $csh->generate;
13
14 print "Result: $salted\n";
15