note 77361 deleted from function.mcrypt-ecb by danbrown
| From: | danbrown@php.net | Date: | Wed, 17 Aug 2011 15:43:21 +0000 |
| Subject: | note 77361 deleted from function.mcrypt-ecb by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-182545@lists.php.net to get a copy of this message | ||
Note Submitter: andry at zionit dot ru
----
<?php
function decrypt($value)
{
global $LICENSE_KEY;
$key = substr(md5($_SERVER['REMOTE_ADDR']), 0, 6);
if(function_exists("mcrypt_ecb"))
{
return mcrypt_ecb(MCRYPT_3DES, $key, $value, MCRYPT_DECRUPT);
}
else return $value;
}
// РаÑÑÑÑÑовка кÑкиÑов Ñ
иÑполÑзованием клÑÑа
function encrypt($value)
{
global $LICENSE_KEY;
$key = substr(md5($_SERVER['REMOTE_ADDR']), 0, 6);
if(function_exists("mcrypt_ecb"))
{
return mcrypt_ecb(MCRYPT_3DES, $key, $value, MCRYPT_ENCRYPT);
}
else return $value;
}
?>