
<?php
// ENCRYPTIE FUNCTIE
function encrypt($password) {

$key = "ikbenhendryendezeencryptoriserggoednoujadathoopikteminstemorbitortororcitinciduntatporttitoreucongueaurnanullamtortorpedevolutpatsitametpharetraegetsuscipitidantesedtortormaurisfeugiataultricessedgravidanecdolor";
$crypt = "";
for($i=0;$i<strlen($password);$i++) {
$i_key = ord(substr($key, $i, 1));
$i_pass = ord(substr($password, $i, 1));
$n_key = ord(substr($key, $i+1, 1));
$i_crypt = $i_pass + $i_key;
$i_crypt = $i_crypt - $n_key;
if($i_crypt == 92) {
$i_crypt = 251;
}
$crypt .= chr($i_crypt);
}
return $crypt;
} //END encrypt() functie


// DECRYPTIE FUNCTIE
function decrypt($password) {

$key = "ikbenhendryendezeencryptoriserggoednoujadathoopikteminstemorbitortororcitinciduntatporttitoreucongueaurnanullamtortorpedevolutpatsitametpharetraegetsuscipitidantesedtortormaurisfeugiataultricessedgravidanecdolor";
$crypt = "";
$password = stripslashes($password);
for($i=0;$i<strlen($password);$i++) {
$i_key = ord(substr($key, $i, 1));
$i_pass = ord(substr($password, $i, 1));
if($i_pass == 251) {
$i_pass = 92;
}
$n_key = ord(substr($key, $i+1, 1));
$i_crypt = $i_pass + $n_key;
$i_crypt = $i_crypt - $i_key;
$crypt .= chr($i_crypt);
}
return $crypt;
} //EINDE decrypt() functie


echo encrypt("ditismijnwachtwoord");
// echo'ed: = brq`yp`t`puZrsb&#8222;oio


echo"<br><br>";


echo decrypt("brq`yp`t`puZrsb&#8222;oio");
// echo'ed: ditismijnwachtwoord
?>
