#!/usr/bin/perl use Authen::Passphrase::DESCrypt; use Authen::Passphrase::BigCrypt; use Authen::Passphrase::MD5Crypt; use Authen::Passphrase::BlowfishCrypt; $u = 0; while ($p = <>) { next if ($p =~ /^#!comment/); chomp $p; $h = Authen::Passphrase::DESCrypt->new(passphrase => $p, salt_random => 12); print "u$u-des:", $h->as_crypt, ":$u:0:$p", "::\n"; if (length($p) > 8) { $h = Authen::Passphrase::BigCrypt->new(passphrase => $p, salt_random => 12); print "u$u-bigcrypt:", $h->salt_base64_2, $h->hash_base64, ":$u:0:$p", "::\n"; } $h = Authen::Passphrase::DESCrypt->new(passphrase => $p, fold => 1, nrounds => 725, salt_random => 24); print "u$u-bsdi:", $h->as_crypt, ":$u:0:$p", "::\n"; $h = Authen::Passphrase::MD5Crypt->new(passphrase => $p, salt_random => 1); print "u$u-md5:", $h->as_crypt, ":$u:0:$p", "::\n"; $h = Authen::Passphrase::BlowfishCrypt->new(passphrase => $p, cost => 5, salt_random => 1); print "u$u-bf:", $h->as_crypt, ":$u:0:$p", "::\n"; $u++; }