note 14119 rejected and deleted from index.php by philip

From: Date: Mon, 30 Jul 2001 23:34:08 +0000
Subject: note 14119 rejected and deleted from index.php by philip
Groups: php.notes 
Request: Send a blank email to php-notes+get-16083@lists.php.net to get a copy of this message
Here are two functions for encrypting and de-encrypting words, can be used for security purposes : <? function cyb_encrypt($word,$password){ $y=0; for ($x=0;$x<strlen($word);$x++) { $ret .= chr(ord(substr($word,$x,1)) + ord(substr($password,$y,1))); $y++; if($y> strlen($password)){$y=1;} } return $ret; } function cyb_deencrypt($word,$password){ $y=0; for ($x=0;$x<strlen($word);$x++) { $ret .= chr(ord(substr($word,$x,1)) - ord(substr($password,$y,1))); $y++; if($y> strlen($password)){$y=1;} } return $ret; } ?>

« previous php.notes (#16083) next »