Menu

#1 when ord($pwd[$i % $pwd_length]) empty

open
nobody
None
5
2008-10-06
2008-10-06
Anonymous
No

when ord($pwd[$i % $pwd_length]) empty,
$key[$i] will still add.
But in C key empty will be abort.
So,I change it.
--
$KeyIntArr = array();
for($i = 0; $i < $pwd_length; $i++)
{
$check=0;
$check=ord($pwd[$i % $pwd_length]);
if(!empty($check))
{
$KeyIntArr[]=ord($pwd[$i % $pwd_length]);
}
}
#print_r($KeyIntArr);
$KeyIntArr_length=count($KeyIntArr);
for ($i = 0; $i < 256; $i++)
{
#$key[$i] = ord($pwd[$i % $pwd_length]);
$key[$i] = $KeyIntArr[$i % $KeyIntArr_length];
$box[$i] = $i;
}

Discussion


Log in to post a comment.