Return to test2.pl CVS log | Up to [local] / palm / Palm-Keyring |
File: [local] / palm / Palm-Keyring / test2.pl (download)
Revision 1.3, Tue Jan 30 04:59:55 2007 UTC (17 years, 5 months ago) by andrew
Switch to decrypting one record at a time when requested. That leads to more tests so that's kewl :-) |
#!/usr/bin/perl use strict; use warnings; use diagnostics; use lib 'lib'; use Palm::PDB; use Palm::Keyring; use YAML; my $pdb = new Palm::PDB; $pdb->Load("Keys-Gtkr.pdb") || die "Unable to load PDB"; #print Dump $pdb->{'records'}; print "Enter: "; my $Pass = <>; chomp $Pass; print "\n"; foreach my $rec (@{ $pdb->{'records'} }) { next unless $rec->{'encrypted'}; my $acct = $pdb->Decrypt($rec, $Pass) || die "Couldn't decrypt!"; print Dump $rec, $acct; }