Annotation of palm/Palm-Keyring/test2.pl, Revision 1.3
1.1 andrew 1: #!/usr/bin/perl
2: use strict;
3: use warnings;
4: use diagnostics;
5:
6: use lib 'lib';
1.3 ! andrew 7: use Palm::PDB;
1.1 andrew 8: use Palm::Keyring;
1.3 ! andrew 9: use YAML;
! 10:
! 11: my $pdb = new Palm::PDB;
1.1 andrew 12:
1.3 ! andrew 13: $pdb->Load("Keys-Gtkr.pdb") || die "Unable to load PDB";
1.1 andrew 14:
1.3 ! andrew 15: #print Dump $pdb->{'records'};
1.1 andrew 16:
1.2 andrew 17: print "Enter: ";
18: my $Pass = <>;
19: chomp $Pass;
20: print "\n";
21:
1.1 andrew 22:
1.3 ! andrew 23: foreach my $rec (@{ $pdb->{'records'} }) {
! 24: next unless $rec->{'encrypted'};
! 25:
! 26: my $acct = $pdb->Decrypt($rec, $Pass) || die "Couldn't decrypt!";
! 27: print Dump $rec, $acct;
! 28: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>