Public feed #598296

Miscellany

public text v1 · immutable
Raw Edit
·published 2007-07-01 06:22 UTC
rendered paste body
function encrypt($string)
{
	$pow = strlen($string); 
	for($x = 0; $x < strlen($string); $x++)
	{
		$chr = ord($string{$x});
		$y = floor(pow($chr*$pow/($x+1), 2));
		$z = floor($chr*$pow/2-22); 
		$i = str_split(floor(($z/2)*($y/2)), 2); 
		if ($z < 0) 
		{ 
			$z = -$z;
		} 
		if ($y < 0)
		{
			$y = -$y; 
		} 
		foreach ($i as $c)
		{ 
			if ($c != 10 && $c != 13 && $c != 0)
			{
				while ($c < 65)
				{ 
					$c += 30;
				} 
				while ($c > 122)
				{ 
					$c -= 29;
				} 
				$ret .= chr($c); 
			} 
		} 
	} 
	return $ret; 
}