Thanks pg thats just what I needed to see. I think I got those problems
sorted
but I'm after uncovering new problems. I'm trying to
This doesn't seem to want to work new_cipher() doesn't envoke get_key() at all. And when new_cipher is run it returns an error of invalid key.(From the DES module) although the key has been created correctly(as far as I can see.) The $key is created at the start of the script and is accessible to all functions.(i.e. its public) in each of the functions I use $newkey #(a new private var) for creating and setting the key.
See the functions new_cipher() and get_key() below.
sub new_cipher { my $newkey = get_key() if ($key eq ""); my $cipher = Crypt::CBC->new( {'key' => "$newkey", 'cipher' => 'DES', 'iv' => '$KJh#(}q', 'regenerate_key' => 0, # default tr +ue 'padding' => 'space', 'prepend_iv' => 0 }); return $cipher; } sub get_key { my $getkeybox = $mw->DialogBox(-title=>"Set Encryption Key", -buttons=>["Ok", "Cancel"] ); $getkeybox->add('Label', -anchor => 'w', -justify => 'left', -text => qq(Please enter your Encryption Key))->pa +ck(qw/-side top -anchor w/); my $keybox = $getkeybox->add('Entry', -takefocus => '1', -textvariable => "$key", )->pack(qw/-side top -fill both -expand 1 + -anchor w/); my $button = $getkeybox->Show(); my $newkey = pack("H16", $keybox->get) unless $button eq "Cancel"; $key = $newkey; return $newkey; }
Tk::Error: Can't locate object method "TIEHANDLE" via package "" at cbc.pl line 162.
If everything seems to be going well, you obviously don't know what the hell is going on.
In reply to Re: Re: popup values in Tk
by eoin
in thread popup values in Tk
by eoin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |