Hi List,
I am getting this error when i calling a cryptcookie.pl script from my
index.cgi that use Crypt::CBC and MD5.
[Fri Jun 17 11:30:31 2005] [error] [client x.x.x.x] Premature end of
script headers: index.cgi
[Fri Jun 17 11:30:31 2005] [error] [client x.x.x.x] Cipher stream did not
contain IV or salt, and you did not specify these values in new() at
libs/cryptcookies.pl line 24
--------------------------cryptcookies.pl---------------------------------
use MD5 ();
use Crypt::CBC;
use strict;
use vars '$CIPHER';
require "libs/checksum.pl";
$lib::crypt::cryptcookies::secret = "polkka";
$CIPHER ||= Crypt::CBC->new($lib::crypt::cryptcookies::secret, 'Blowfish');
## args: data to be encrypted and checksummed
sub encryptcookie {
my $checksum = &newchecksum($lib::crypt::cryptcookies::secret, @_);
return $CIPHER->encrypt_hex(join(':', $checksum, @_));
}
## 0: encrypted cookie
sub decryptcookie {
##24 my($checksum, @values) = split(/:/, $CIPHER->decrypt_hex($_[0]));
if(&verifychecksum($lib::crypt::cryptcookies::secret, $checksum,
@values)) {
return @values;
}
return undef;
}
1;
---------------------------------------------------------------------------
I did install MD5 and Crypt::CBC. What will be the problem ?
Thanks,
KetVin
********************* Confidentiality Notice **************************
This message contains confidential information and is intended only for
the individual named. If you are not the named addressee you should
not disseminate, distribute or copy this e-mail. Please notify the
sender immediately by e-mail if you have received this e-mail by
mistake and delete this e-mail from your system.
*****************************************************************
Thread Next