=================================================================== RCS file: /cvs/palm/Palm-Keyring/examples/example3.pl,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- palm/Palm-Keyring/examples/example3.pl 2008/02/28 00:17:33 1.9 +++ palm/Palm-Keyring/examples/example3.pl 2008/03/05 22:04:46 1.10 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $RedRiver: example3.pl,v 1.8 2008/02/27 23:54:02 andrew Exp $ +# $RedRiver: example3.pl,v 1.9 2008/02/28 00:17:33 andrew Exp $ ######################################################################## # palmkeyring.pl *** a command line client for Keyring databases. # @@ -94,9 +94,9 @@ sub show_items { + get_password() || die "Couldn't decrypt file!"; foreach (0..$#{ $pdb->{'records'} }) { - my $r = $pdb->{'records'}->[$_]; - + my $r = $pdb->{'records'}->[$_]; my $category = $pdb->{'appinfo'}->{'categories'}->[ $r->{'category'} ]->{'name'}; @@ -109,13 +109,11 @@ } next if ( @{ $Categories } || @{ $Names } ) && not $matched; - get_password() || die "Couldn't decrypt file!"; + my $a = $pdb->Decrypt($r); - my $a = $pdb->Decrypt($r); - $matched = 0; - + $matched = 0; foreach my $account (@{ $Accounts }) { - $matched++ if uc($r->{plaintext}->{1}->{data}) eq uc($account); + $matched++ if uc($a->{1}->{data}) eq uc($account); } next if ( @{ $Accounts } ) && not $matched;