$ cat test.pl #!/usr/local/bin/perl use Digest::SHA1; # encrypts password using # SHA-1 algorithm my $sha1 = Digest::SHA1->new; # reset algorithm $sha1->hexdigest; # encrypt $passwd = 'password'; $salt = 1658087940; my $secret = $sha1->sha1_hex($passwd . $salt); print "Secret: ", $secret, "\n"; $ ./test.pl Secret: c757584a6cff45409cdf716903aa363e95354860 $ ./test.pl Secret: c757584a6cff45409cdf716903aa363e95354860