Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
PHP Encrypt Function (selfmade)
SUBMITTED BY:
Guest
DATE:
July 8, 2013, 6:56 p.m.
FORMAT:
PHP
SIZE:
699 Bytes
Raw
Download
Tweet
HITS:
1324
Go to comments
Report
function encode($string)
{
$secString = md5("geheim");
$length = strlen($string);
$pos = rand(0,$length);
$string = base64_encode($string);
$secured = '';
for($i=0;$i<=$length;$i++)
{
if( $i == $pos )
{
$secured .= $secString.$string[$i];
}
else
{
$secured .= $string[$i];
}
}
return $secured;
}
function decode($string)
{
$secString = md5("geheim");
$string = str_replace($secString,"",$string);
$string = base64_decode( $string );
return $string;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus