=================================================================== RCS file: /cvs/palm/Palm-Keyring/lib/Palm/Keyring.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- palm/Palm-Keyring/lib/Palm/Keyring.pm 2007/01/31 04:17:15 1.19 +++ palm/Palm-Keyring/lib/Palm/Keyring.pm 2007/01/31 04:29:08 1.20 @@ -1,6 +1,6 @@ package Palm::Keyring; -# $RedRiver: Keyring.pm,v 1.18 2007/01/30 05:18:06 andrew Exp $ +# $RedRiver: Keyring.pm,v 1.19 2007/01/31 04:17:15 andrew Exp $ # # Perl class for dealing with Keyring for Palm OS databases. # @@ -192,11 +192,11 @@ } return { - name => $rec->{'name'}, - account => $account, - password => $password, - notes => $notes, - date => \%Modified, + name => $rec->{'name'}, + account => $account, + password => $password, + notes => $notes, + lastchange => \%Modified, }; } @@ -453,9 +453,15 @@ $acct is a hashref in the format below. my $acct = { - account => $account, - password => $password, - notes => $notes, + name => $rec->{'name'}, + account => $account, + password => $password, + notes => $notes, + lastchange => { + year => 107, # years since 1900 + month => 0, # 0-11, 0 = January, 11 = December + day => 30, # 1-31, same as l + }, }; =head2 Decrypt @@ -463,7 +469,9 @@ my $acct = $pdb->Decrypt($rec[, $password]); Decrypts the record and returns a hashref for the account as described -under Encrypt(); +under Encrypt(). +However, it ignores the "lastchange" field and generates its own. +It also only uses the "name" field if there is not already a $rec->{'name'}. foreach (0..$#{ $pdb->{'records'}) { next if $_ == 0;