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

File: [local] / palm / Palm-Keyring / examples / example2.pl (download)

Revision 1.4, Fri Aug 10 04:13:31 2007 UTC (16 years, 9 months ago) by andrew
Branch: MAIN
CVS Tags: PALM_KEYRING_0_96_06, HEAD
Changes since 1.3: +6 -6 lines

Switch to the forward looking data presentation and fake out the v4 databases.

Should make writing stuff a LOT easier.

#!/usr/bin/perl
# $RedRiver: example2.pl,v 1.3 2007/01/31 04:17:15 andrew Exp $
use strict;
use warnings;

use Palm::PDB;
use Palm::Keyring;

my $pdb = new Palm::PDB;

$pdb->Load("Keys-Gtkr-example.PDB"); 
$pdb->Password('12345');

foreach my $rec (@{ $pdb->{records} }) {
    my $acct = $pdb->Decrypt($rec);

    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";
}