=================================================================== RCS file: /cvs/palm/Palm-Keyring/examples/example1.pl,v retrieving revision 1.8 retrieving revision 1.10 diff -u -r1.8 -r1.10 --- palm/Palm-Keyring/examples/example1.pl 2006/12/06 18:45:42 1.8 +++ palm/Palm-Keyring/examples/example1.pl 2007/08/10 05:13:31 1.10 @@ -1,27 +1,21 @@ #!/usr/bin/perl +# $RedRiver: example1.pl,v 1.9 2007/01/30 04:59:55 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(); -my $new_record = $pdb->append_Record(); - -$new_record->{plaintext} = { - name => 'Test3', - account => 'anothertestaccount', - password => 'adifferentmypass', - description => 'now that really roxorZ!', +my $acct = { + 0 => { data => 'Test3' }, + 1 => { data => 'anothertestaccount' }, + 2 => { data => 'adifferentmypass' }, + 255 => { data => 'now that really roxorZ!' }, }; -$pdb->Encrypt('12345'); +$pdb->Encrypt($rec, $acct); -$pdb->Write("Keys-GtkrNEW.PDB"); - -print Dump $pdb; - +$pdb->Write("Keys-Gtkr-example.PDB");