sub verify_wordpress_pass { my ($wordpress_hashed_pw, $passphrase) = @_; use Authen::Passphrase::PHPass; my $ppr = Authen::Passphrase::PHPass->from_crypt($wordpress_hashed_pw); # Note, $passphrase is the unencrypted password you want to verify return $ppr->match($passphrase); # Returns 1 if matched, undef if failed } #### sub print_wordpress_pass { my ($wordpress_hashed_pw, $passphrase) = @_; use Authen::Passphrase::PHPass; my $ppr = Authen::Passphrase::PHPass->from_crypt($wordpress_hashed_pw); # Note, $passphrase is the unencrypted password you want to verify my $set_ppr = Authen::Passphrase::PHPass->new( cost => $ppr->cost, salt => $ppr->salt, passphrase => $passphrase ); print $wordpress_hashed_pw . "\n" . $set_ppr->as_crypt . "\n"; }