Answer the question
In order to leave comments, you need to log in
How good are the encryption features?
Hi all. I wanted to ask how good these encryption / decryption functions are? And it is worth using them to encrypt important data.
function encode($unencoded, $key)
{
$string = base64_encode($unencoded);
$arr = array();
$x = 0;
while($x++ < strlen($string))
{
$arr[$x-1] = md5(md5($key.$string[$x-1]).$key);
$newstr = $newstr.$arr[$x-1][3].$arr[$x-1][6].$arr[$x-1][1].$arr[$x-1][2];
}
return $newstr;
}
function decode($encoded, $key)
{
$strofsym = "qwertyuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFGHJKLZXCVBNM=";
$x = 0;
while($x++ <= strlen($strofsym))
{
$tmp = md5(md5($key.$strofsym[$x-1]).$key);
$encoded = str_replace($tmp[3].$tmp[6].$tmp[1].$tmp[2], $strofsym[$x-1], $encoded);
}
return base64_decode($encoded);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question