=================================================================== RCS file: /cvs/palm/Palm-Keyring/examples/example1.pl,v retrieving revision 1.2 retrieving revision 1.9 diff -u -r1.2 -r1.9 --- palm/Palm-Keyring/examples/example1.pl 2006/01/31 23:03:39 1.2 +++ palm/Palm-Keyring/examples/example1.pl 2007/01/30 04:59:55 1.9 @@ -1,37 +1,21 @@ -#!/usr/bin/perl -use strict; -use warnings; -use diagnostics; - -use Palm::PDB; -use lib 'lib'; -use Palm::Keyring; - -my $pdb = new Palm::PDB; - -use YAML; - -#print Dumper $pdb - -#$pdb->Load("Keys-GtkrNEW.PDB"); -#$pdb->Decrypt('12345'); -$pdb->Load("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; - +#!/usr/bin/perl +# $RedRiver$ +use strict; +use warnings; + +use Palm::Keyring; + +my $pdb = new Palm::Keyring('12345'); + +my $rec = $pdb->append_Record(); + +my $acct = { + name => 'Test3', + account => 'anothertestaccount', + password => 'adifferentmypass', + notes => 'now that really roxorZ!', +}; + +$pdb->Encrypt($rec, $acct); + +$pdb->Write("Keys-Gtkr-example.PDB");