Do you have a question? Post it now! No Registration Necessary. Now with pictures!
November 29, 2006, 4:04 am
rate this thread
with this one?
I have an encrypted string which I'm reading from a zipped file. It was
pack ( "la" . strlen (encrypted), strlen (encrypted), strlen (encrypted))
most of the time, it decrypts correctly when I unpack as...
list (, $Len ) = unpack ("l", gzread($ZipFile, 4));
$temp = unpack ( "C".$Len, gzread($ZipFile, $Len));
...except when it doesn't. I have no control over the format of the file,
so can't change that. My gut feeling is that the problems are caused by
the 'a' flag used to write it, which may be adding nulls to the string.
Anyone got any ideas what I'm doing wrong??