=================================================================== RCS file: /cvs/palm/Palm-Keyring/examples/example1.pl,v retrieving revision 1.6 retrieving revision 1.11 diff -u -r1.6 -r1.11 --- palm/Palm-Keyring/examples/example1.pl 2006/11/10 04:21:17 1.6 +++ palm/Palm-Keyring/examples/example1.pl 2007/09/12 04:59:37 1.11 @@ -1,36 +1,21 @@ #!/usr/bin/perl +# $RedRiver: example1.pl,v 1.10 2007/08/10 04:13:31 andrew Exp $ use strict; use warnings; -use diagnostics; -use lib 'lib'; use Palm::Keyring; -my $pdb = new Palm::Keyring; +my $pdb = new Palm::Keyring('12345'); -use YAML; +my $rec = $pdb->append_Record(); -#print Dumper $pdb +$rec->{plaintext} = { + 0 => { data => 'Test3' }, + 1 => { data => 'anothertestaccount' }, + 2 => { data => 'adifferentmypass' }, + 255 => { data => 'now that really roxorZ!' }, +}; -$pdb->Load("Keys-GtkrNEW.PDB"); -#$pdb->Load("Keys-Gtkr.PDB"); -#$pdb->Load("k:/working/Keys-Gtkr.PDB"); -$pdb->Decrypt('Password'); - -#-------------------------------------------------- -# 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; - +$pdb->Encrypt($rec); + +$pdb->Write("Keys-Gtkr-example.PDB");