version 1.5, 2006/11/10 01:46:40 |
version 1.9, 2007/01/30 04:59:55 |
|
|
#!/usr/bin/perl |
#!/usr/bin/perl |
|
# $RedRiver$ |
use strict; |
use strict; |
use warnings; |
use warnings; |
use diagnostics; |
|
|
|
use lib 'lib'; |
|
use Palm::Keyring; |
use Palm::Keyring; |
|
|
my $pdb = new Palm::Keyring; |
my $pdb = new Palm::Keyring('12345'); |
|
|
use YAML; |
my $rec = $pdb->append_Record(); |
|
|
#print Dumper $pdb |
my $acct = { |
|
name => 'Test3', |
|
account => 'anothertestaccount', |
|
password => 'adifferentmypass', |
|
notes => 'now that really roxorZ!', |
|
}; |
|
|
#$pdb->Load("Keys-GtkrNEW.PDB"); |
$pdb->Encrypt($rec, $acct); |
#$pdb->Decrypt('12345'); |
|
$pdb->Load("Keys-Gtkr.PDB"); |
$pdb->Write("Keys-Gtkr-example.PDB"); |
#$pdb->Load("k:/working/Keys-Gtkr.PDB"); |
|
$pdb->Decrypt('12345'); |
|
|
|
#-------------------------------------------------- |
|
# my $new_record = $pdb->append_Record(); |
|
# |
|
# $new_record->{plaintext} = { |
|
# name => 'Test3', |
|
# account => 'anothertestaccount', |
|
# password => 'adifferentmypass', |
|
# description => 'now that really roxorZ!', |
|
# }; |
|
# |
|
#$pdb->Encrypt('12345'); |
|
# |
|
#$pdb->Write("Keys-GtkrNEW.PDB"); |
|
#-------------------------------------------------- |
|
|
|
print Dump $pdb; |
|
|
|