ERROR: input must be 8 bytes long at /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Crypt/DES.pm line 57.For me, DES.pm contains:
52: sub encrypt
53: {
54: usage("encrypt data[8 bytes]") unless @_ == 2;
55:
56: my ($self,$data) = @_;
57: return Crypt::DES::crypt($data, $data, $self->{'ks'}, 1);
58: }
It's that first argument to Crypt::DES::crypt() that needs to be 8 bytes long.
I would try inserting a print statement in there - on both the successful and the failing machines. Hopefully, the difference in the output will enable you to determine the cause of the problem (and the solution). Try changing that code to (untested):
sub encrypt
{
usage("encrypt data[8 bytes]") unless @_ == 2;
my ($self,$data) = @_;
print "\nMY DEBUG: ", length($data), " ", $data, "\n\n";
return Crypt::DES::crypt($data, $data, $self->{'ks'}, 1);
}
Cheers,
Rob
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.