version 1.39, 2007/02/23 03:24:09 |
version 1.40, 2007/02/23 03:32:46 |
|
|
package Palm::Keyring; |
package Palm::Keyring; |
# $RedRiver: Keyring.pm,v 1.38 2007/02/23 02:54:49 andrew Exp $ |
# $RedRiver: Keyring.pm,v 1.39 2007/02/23 03:24:09 andrew Exp $ |
######################################################################## |
######################################################################## |
# Keyring.pm *** Perl class for Keyring for Palm OS databases. |
# Keyring.pm *** Perl class for Keyring for Palm OS databases. |
# |
# |
|
|
|
|
It currently supports the v4 Keyring databases as well as |
It currently supports the v4 Keyring databases as well as |
the pre-release v5 databases. I am not completely happy with the interface |
the pre-release v5 databases. I am not completely happy with the interface |
for accessing the v5 database, so any suggestions on improvements on |
for accessing v5 databases, so any suggestions on improvements on |
the interface are appreciated. |
the interface are appreciated. |
|
|
This module doesn't store the decrypted content. It only keeps it until it |
This module doesn't store the decrypted content. It only keeps it until it |
|
|
=back |
=back |
|
|
For v5 databases there are some additional appinfo fields set. |
For v5 databases there are some additional appinfo fields set. |
|
These are set either on new() or Load(). |
|
|
$pdb->{appinfo} = { |
$pdb->{appinfo} = { |
# normal appinfo stuff described in L<Palm::StdAppInfo> |
# normal appinfo stuff described in L<Palm::StdAppInfo> |
|
|
These only make sense for v5 databases. |
These only make sense for v5 databases. |
|
|
This is a function, not a method. |
This is a function, not a method. |
|
|
$cipher can be 0, 1, 2, 3, None, DES_EDE3, AES128 or AES256. |
$cipher can be 0, 1, 2, 3, None, DES_EDE3, AES128 or AES256. |
|
|
my $c = Palm::Keyring::crypt($cipher); |
my $c = Palm::Keyring::crypt($cipher); |
|
|
Decrypts the record and returns a reference for the account as described |
Decrypts the record and returns a reference for the account as described |
under Encrypt(). |
under Encrypt(). |
|
|
foreach (0..$#{ $pdb->{records}) { |
foreach (0..$#{ $pdb->{records} }) { |
next if $_ == 0 && $pdb->{version} == 4; |
next if $_ == 0 && $pdb->{version} == 4; |
my $rec = $pdb->{records}->[$_]; |
my $rec = $pdb->{records}->[$_]; |
my $acct = $pdb->Decrypt($rec); |
my $acct = $pdb->Decrypt($rec); |