[BACK]Return to example2.pl CVS log [TXT][DIR] Up to [local] / palm / Palm-Keyring / examples

Annotation of palm/Palm-Keyring/examples/example2.pl, Revision 1.4

1.1       andrew      1: #!/usr/bin/perl
1.4     ! andrew      2: # $RedRiver: example2.pl,v 1.3 2007/01/31 04:17:15 andrew Exp $
1.1       andrew      3: use strict;
                      4: use warnings;
                      5:
1.2       andrew      6: use Palm::PDB;
1.1       andrew      7: use Palm::Keyring;
                      8:
1.2       andrew      9: my $pdb = new Palm::PDB;
1.1       andrew     10:
1.2       andrew     11: $pdb->Load("Keys-Gtkr-example.PDB");
                     12: $pdb->Password('12345');
1.1       andrew     13:
1.4     ! andrew     14: foreach my $rec (@{ $pdb->{records} }) {
1.2       andrew     15:     my $acct = $pdb->Decrypt($rec);
                     16:
1.4     ! andrew     17:     my $d = $acct->{3}->{data};
        !            18:     my $date = ($d->{year} + 1900) . '/' . ($d->{month} + 1) . '/' . $d->{day};
        !            19:     print join ":", $acct->{0}->{data} , $acct->{1}->{data},
        !            20:         $acct->{2}->{data}, $date, $acct->{255}->{data};
1.2       andrew     21:     print "\n";
                     22: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>