| version 1.3, 2006/02/02 00:59:08 |
version 1.10, 2007/08/10 05:13:31 |
|
|
| #!/usr/bin/perl
|
#!/usr/bin/perl |
| use strict;
|
# $RedRiver: example1.pl,v 1.9 2007/01/30 04:59:55 andrew Exp $ |
| use warnings;
|
use strict; |
| use diagnostics;
|
use warnings; |
|
|
|
| use lib 'lib';
|
use Palm::Keyring; |
| use Palm::Keyring;
|
|
|
|
my $pdb = new Palm::Keyring('12345'); |
| my $pdb = new Palm::Keyring;
|
|
|
|
my $rec = $pdb->append_Record(); |
| use YAML;
|
|
|
|
my $acct = { |
| #print Dumper $pdb
|
0 => { data => 'Test3' }, |
|
|
1 => { data => 'anothertestaccount' }, |
| #$pdb->Load("Keys-GtkrNEW.PDB");
|
2 => { data => 'adifferentmypass' }, |
| #$pdb->Decrypt('12345');
|
255 => { data => 'now that really roxorZ!' }, |
| $pdb->Load("Keys-Gtkr.PDB");
|
}; |
| $pdb->Decrypt('Password');
|
|
|
|
$pdb->Encrypt($rec, $acct); |
| #--------------------------------------------------
|
|
| # my $new_record = $pdb->append_Record();
|
$pdb->Write("Keys-Gtkr-example.PDB"); |
| #
|
|
| # $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;
|
|
|
|
|