I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2006-05-01 21:05:05-07 by arul
input must be 8 bytes long at DES.pm line 58.
I have integrated NET:SFTP module and trying test the "sftp put" fuctionality.
put($lclfile, "$remfile");
Occasionally I get this error "input must be 8 bytes long at DES.pm line 58.".
When I execute the same command next time the sftp put works fine.
Any clue?
Direct Responses: 2226 | Write a response
Posted on 2006-05-02 19:09:54-07 by arul in response to 2224
Re: input must be 8 bytes long at DES.pm line 58.
More precisely I get this error first time after SFTP setup.After exchanging the keys. Please help..
Direct Responses: 2569 | Write a response
Posted on 2006-07-03 05:30:56-07 by lyask in response to 2226
Re: input must be 8 bytes long at DES.pm line 58.
Hi arul, Have you resolved this issue yet? I also encountered this problem when using Net-SFTP. It seems wired and I can't find the exactly solution to it. So if you have find the reason for it, could you please send a mail to me at liyongzju@gmail.com? Thanks a lot! -Leo
Direct Responses: 2747 | Write a response
Posted on 2006-08-03 12:18:18-07 by rahed in response to 2569
Re: input must be 8 bytes long at DES.pm line 58.
Possible culprit could be encoding. Your input has to have characters 8 byte long. If it's in e.g. utf8, change it this way: from_to ($input,'utf8','iso-8859-1') where from_to must be imported from Encode module. Radek
Direct Responses: 4443 | 4444 | Write a response
Posted on 2007-02-27 16:18:58-08 by jestill in response to 2747
Re: input must be 8 bytes long at DES.pm line 58.
I was having the same problem when sending a User Password that was taken from the command line. The following code worked for me:
use utf8; # .. MORE CODE HERE .. # GET USER PASSWORD print "\nPassword for $UserName\n"; system('stty', '-echo') == 0 or die "can't turn off echo: $?"; my $UserPassword = <STDIN>; system('stty', 'echo') == 0 or die "can't turn on echo: $?"; chomp $UserPassword; # Remove newline character # Convert to utf8 to avoid problem with DES.pm module utf8::encode ($UserPassword); # THE SFTP CONNECTION THEN WORKS AS $sftp = Net::SFTP->new( $IndTarget, user=> $UserName, password=> $UserPassword, debug=>"true");
Direct Responses: Write a response
Posted on 2007-02-27 16:23:24-08 by jestill in response to 2747
Re: input must be 8 bytes long at DES.pm line 58.
I was having the same problem when sending a User Password that was taken from the command line. The following code worked for me:
use utf8; # .. MORE CODE HERE .. # GET USER PASSWORD print "\nPassword for $UserName\n"; system('stty', '-echo') == 0 or die "can't turn off echo: $?"; my $UserPassword = <STDIN>; system('stty', 'echo') == 0 or die "can't turn on echo: $?"; chomp $UserPassword; # Remove newline character # Convert to utf8 to avoid problem with DES.pm module utf8::encode ($UserPassword); # THE SFTP CONNECTION THEN WORKS AS $sftp = Net::SFTP->new( $IndTarget, user=> $UserName, password=> $UserPassword, debug=>"true");
Direct Responses: Write a response