![]() |
|
|
#20 |
|
Архивный участник
Join Date: Aug 2005
Posts: 394
|
I'd personally exchange:
Code:
$nBytes = strlen($str);
while ($i < $nBytes)
{
$i++;
$key[$i] = ord(substr($str, $i - 1, 1));
$dst[$i] = $key[$i];
}
Code:
while ($i < 16) {
$i++;
$key[$i] = '';
$dst[$i] = '';
$key[$i] = ord(substr($str, $i - 1, 1));
$dst[$i] = $key[$i];
}
If you don't do this there will be $key's that will remain "undefined". If you have error_reporting on E_ALL you will have a few warnings. If you exchange that part with my code those warnings will be gone + will work fine. |
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|