Simple encryption
Posted: Thu Dec 04, 2008 1:56 am
I'm trying to do a simple data encryption for passwords. Upon which the encryption formula will become increasingly complex.
The following code words, up until i try to decrypt the password.
All help is MUCH appreciated
The following code words, up until i try to decrypt the password.
All help is MUCH appreciated
Code: Select all
<?php
$password = "admin";
$length = strlen($password);
$array = str_split($password);
for($i = 0; $i < $length; $i++){
$tempVal = $array[$i];
$tempVal++;
$array[$i] = $tempVal;
}
// Outputs admin as benjo
echo "<br>Break <br>";
for($i = 0; $i < $length; $i++){
$tempVal = $array[$i];
$tempVal--;
$array[$i] = $tempVal;
}
// Outputs benjo as admin
?>