Wednesday, August 24, 2011

HACK : Simple encryption-decryption algorithm in php



HACK : Simple encryption-decryption algorithm in php

For those peoples who want to save their passwords encrypted.


//function to encrypt the string
function encode5t($str)
{
for($i=0; $i<5;$i++)
{
$str=strrev(base64_encode($str)); //apply base64 first and then reverse the string
}
return $str;
}

//function to decrypt the string
function decode5t($str)
{
for($i=0; $i<5;$i++)
{
$str=base64_decode(strrev($str)); //apply base64 first and then reverse the string}
}
return $str;
}

No comments:

Post a Comment