use Crypt::SaltedHash; my $asserted_password = ___; # Some process to retrieve the value # entered on a web form by the user, not illustrated here my $digest = ___; # Some retrieval process that looks up the earlier-stored # digest corresponding to the username, not illustrated here my $is_valid = Crypt::SaltedHash->validate( $digest, $asserted_password ); grant_account_access() if ( $is_valid );