=================================================================== RCS file: /cvs/palm/Palm-Keyring/lib/Palm/Keyring.pm,v retrieving revision 1.59 retrieving revision 1.61 diff -u -r1.59 -r1.61 --- palm/Palm-Keyring/lib/Palm/Keyring.pm 2008/09/19 06:39:07 1.59 +++ palm/Palm-Keyring/lib/Palm/Keyring.pm 2008/09/19 06:55:35 1.61 @@ -1,5 +1,5 @@ package Palm::Keyring; -# $RedRiver: Keyring.pm,v 1.58 2008/09/19 02:50:05 andrew Exp $ +# $RedRiver: Keyring.pm,v 1.60 2008/09/19 05:53:08 andrew Exp $ ######################################################################## # Keyring.pm *** Perl class for Keyring for Palm OS databases. # @@ -480,18 +480,15 @@ $encrypted = _encrypt_v4($datav4, $acctv4, $self->{digest}); } elsif ($self->{version} == 5) { - ($encrypted, $ivec) = _encrypt_v5( + ($encrypted, $rec->{ivec}) = _encrypt_v5( $data, $acct, $self->{appinfo}->{key}, $self->{appinfo}->{cipher}, $ivec, ); - if (defined $ivec) { - $rec->{ivec} = $ivec; - } } else { - croak "Unsupported Version $self->{version}"; + croak "Unsupported version $self->{version}"; } $rec->{plaintext}->{0} = $data->{0}; @@ -623,7 +620,7 @@ } } - return 1, 0 if $changed == 0; + return (1, $ivec) if $changed == 0; if ($need_newdate) { my ($day, $month, $year) = (localtime)[3,4,5];