=================================================================== RCS file: /cvs/palm/Palm-Keyring/examples/example2.pl,v retrieving revision 1.1 retrieving revision 1.4 diff -u -r1.1 -r1.4 --- palm/Palm-Keyring/examples/example2.pl 2007/01/28 16:17:54 1.1 +++ palm/Palm-Keyring/examples/example2.pl 2007/08/10 05:13:31 1.4 @@ -1,17 +1,22 @@ #!/usr/bin/perl +# $RedRiver: example2.pl,v 1.3 2007/01/31 04:17:15 andrew Exp $ use strict; use warnings; -use diagnostics; -use lib 'lib'; +use Palm::PDB; use Palm::Keyring; -my $pdb = new Palm::Keyring; +my $pdb = new Palm::PDB; -use YAML; +$pdb->Load("Keys-Gtkr-example.PDB"); +$pdb->Password('12345'); -$pdb->Load("Keys-GtkrNEW.PDB"); -$pdb->Decrypt('12345'); +foreach my $rec (@{ $pdb->{records} }) { + my $acct = $pdb->Decrypt($rec); -print Dump $pdb; - + my $d = $acct->{3}->{data}; + my $date = ($d->{year} + 1900) . '/' . ($d->{month} + 1) . '/' . $d->{day}; + print join ":", $acct->{0}->{data} , $acct->{1}->{data}, + $acct->{2}->{data}, $date, $acct->{255}->{data}; + print "\n"; +}