simple/tiny/crypt.pl

11 lines
206 B
Perl
Raw Normal View History

2004-11-03 15:22:26 +01:00
#!@@@perl@@@ -w
2004-11-03 15:18:39 +01:00
use strict;
unless (@ARGV == 2) {
print STDERR "Usage: $0 password salt\n";
exit(2);
}
my $encpwd = crypt($ARGV[0], $ARGV[1]);
print "$encpwd\n";
exit($ARGV[1] eq $encpwd ? 0 : 1);